I was looking for a load-balancing technique with health checks while making my worker-nodes communicating with the API server.
Kubernetes itself has a service called "kubernetes" whose endpoints are the API servers.
I entered the domain of this service in kubeconfig of workernodes and it is behaving well.
The only concern is there are no health checks of the API server, if any of them falls back, the service will still forward the traffic to the node.
Can I configure some health check here??
apiVersion: v1
kind: Service
metadata:
creationTimestamp: 2017-09-06T07:54:44Z
labels:
component: apiserver
provider: kubernetes
name: kubernetes
namespace: default
resourceVersion: "96"
selfLink: /api/v1/namespaces/default/services/kubernetes
uid: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
spec:
clusterIP: 10.32.0.1
ports:
- name: https
port: 443
protocol: TCP
targetPort: 6443
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800
type: ClusterIP
status:
loadBalancer: {}
I know I can use LB like Haproxy, and cloud providers LB but I want to achieve that inside cluster only