Bitzu

KCNA ยท Cluster administration and scheduling

Cluster maintenance, etcd and upgrades

Role of etcd and backups, version skew basics, drain and cordon, upgrade flow.

Key points

  • etcd is the consistent key-value store holding all cluster data, so it is backed up regularly with snapshots.
  • Before maintenance on a node you drain it: it is marked unschedulable and its Pods are evicted; afterwards you uncordon it.
  • Upgrades respect version skew: upgrade kube-apiserver first, then controller-manager and scheduler, then kubelets, and never skip a minor version.

Source: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_drain/

Practice questions

Single choice

What does etcd hold in a Kubernetes cluster?

  1. Container images for all Pods
  2. All cluster state and configuration data
  3. Application logs from every node
  4. The compiled kubelet binaries
Show answer

Answer: B. All cluster state and configuration data

etcd is the backing store for all cluster data, which is why losing it without a backup is serious. It does not run containers or store images.

Select all that apply

Which statements about version skew are correct?

  1. kubelet must not be newer than kube-apiserver
  2. kubectl may be one minor version older or newer than kube-apiserver
  3. kubelet may be one minor version newer than kube-apiserver
  4. A control plane upgrade may skip minor versions
  5. kube-scheduler may be newer than kube-apiserver
Show answer

Answer: A. kubelet must not be newer than kube-apiserver, B. kubectl may be one minor version older or newer than kube-apiserver

kubelet must not be newer than the API server, and kubectl may differ by one minor version in either direction. kubelet newer than the API server and skipping minors are not supported, and the scheduler must not be newer than the API server.

True or false

Running kubectl cordon on a node evicts the Pods already running on it.

Show answer

Answer: False

False. Cordon only marks the node unschedulable for new Pods. Eviction is the extra step that drain performs.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More KCNA topics in this module