Skip to main content

Maintain a cluster

Maintaining a cluster means checking regularly that it is healthy. A healthy cluster keeps your workloads running without problems. Run the checks below manually, or set up alerts for them in your observability stack.

Prerequisites 

  • access to the workload cluster. All commands on this page run against it.

Check the control plane 

Every control plane node should be Ready:

				$ kubectl get nodes --selector='node-role.kubernetes.io/control-plane'
			

The control plane runs the Kubernetes API. When it has a problem, the whole cluster is affected. If a control plane node is NotReady, see .

Check that all nodes are Ready 

Every node in the cluster should be Ready:

				$ kubectl get nodes
			

Kubernetes stops placing new pods on a NotReady node. To find out why a node is NotReady, see .

Check for pending certificate requests 

A new node asks the cluster for certificates when it joins. Syself Autopilot approves these requests on its own. A request that stays Pending can slow down a node or stop it from joining.

				$ kubectl get csr
			

Look for requests that have been Pending for more than a few minutes. Approve the legitimate ones. Find out why the others are stuck.

Check that your workloads can handle a node replacement 

Nodes are replaced from time to time, for example when Syself Autopilot heals a broken node. Your pods then move to other nodes. Make sure your workloads stay available while that happens. See .

Back up your cluster regularly 

It is good practice to back up your cluster regularly. A backup lets you rebuild your cluster if something goes wrong. Back up two things:

  • Your manifests. Commit your cluster and application manifests to Git. Make sure the repository is up to date.
  • Your data. Back up your PersistentVolumeClaims and anything you applied by hand with .