Skip to content

Latest commit

 

History

History
94 lines (67 loc) · 4.32 KB

cluster_overview.md

File metadata and controls

94 lines (67 loc) · 4.32 KB

Cluster Overview

How CKE works

How CKE works

CKE constructs and maintains Kubernetes cluster according to a cluster configuration supplied by an (administrator).

There are two types of nodes in the cluster configuration, that is, workers and control planes. A worker node runs only kubelet and kube-proxy. A control plane runs etcd, kube-apiserver, kube-controller-manager, kube-scheduler as well as kubelet and kube-proxy.

The number of the control plane nodes must be at least 1.

Maintenance strategy

The exact strategy of how CKE constructs and maintains its Kubernetes cluster is coded in DecideOps in server/strategy.go.

Automatic update

When CKE is upgraded and continues to maintain a Kubernetes cluster constructed by the previous CKE version, the new CKE sometimes needs to do some upgrade operations.

To check such needs, CKE stores config-version key in etcd. If this version is not the same as the current configuration version, then CKE runs necessary operations and update config-version in etcd.

config-version is not the version of CKE; it is just an stringified integer starting from "1". If the key is not in etcd, config-version is considered as "1".

Worker Nodes

CKE deploys following components to worker nodes:

  • kubelet
  • kube-proxy
  • rivers

CKE deploys rivers to all nodes to proxy kube-apiserver for high availability. It works as a load balancer to the servers, and every Kubernetes components connect to kube-apiservers via it (see also k8s.md).

Worker Nodes

CKE deploys each worker-node component concurrently on multiple nodes. You can control the deployment concurrency by specifying the max-concurrent-updates command-line option.

Control Plane Nodes

CKE deploys following components to control plane nodes:

  • etcd
  • etcd-rivers (works as a load balancer to etcd)
  • kube-apiserver
  • kube-scheduler
  • kube-controller-manager
  • rivers (works as a load balancer to kube-apiserver)

CKE constructs etcd cluster before it construct Kubernetes cluster. Then CKE deploys Kubernetes components with rivers.

Control Plane Nodes

DNS

CKE deploys CoreDNS as in-cluster DNS server to resolve names registered by Kubernetes such as service name xxx.default.svc.cluster.local. CKE also deploys node-local DNS server to proxy CoreDNS, and each pod refer it as DNS server. Node-local DNS is responsible for caching names. CKE deploys unbound as node-local DNS. Node-local DNS also refer full resolver to resolve domain from the internet.

Since CKE does not deploy full resolver on the cluster, you should deploy a full resoluver by yourself, or set Public DNS such as 8.8.8.8 to dns_servers in cluster config.

DNS