Latest
Kubernetes 2 min read

Troubleshoot and Maintain a Small Kubernetes Cluster

Troubleshoot and Maintain a Small Kubernetes Cluster
Kubernetes · November 28, 2026

Version note: examples use the Kubernetes v1.35 documentation snapshot, not necessarily the newest release. Check current support and component compatibility. These commands were not tested on a live cluster.

What this guide covers

Safe cluster maintenance starts by identifying the failing component and checking whether applications can keep running during a node outage. This guide covers diagnostic commands and a basic drain sequence, not a complete version-specific upgrade procedure.

Before you start

Use a test cluster with backups and administrative access. Know where persistent data lives. With one worker, draining that worker can stop all ordinary applications.

Step 1: Read the failure before changing settings

Replace the namespace and Pod placeholders, then run:

kubectl get nodes -o wide
kubectl get pods -A -o wide
kubectl -n TARGET_NAMESPACE describe pod TARGET_POD
kubectl -n TARGET_NAMESPACE logs TARGET_POD --all-containers
kubectl -n TARGET_NAMESPACE get events --sort-by=.metadata.creationTimestamp

Pending often means a scheduling or storage problem. ImagePullBackOff concerns image retrieval. CrashLoopBackOff means a container repeatedly exits. Follow the specific event and logs rather than restarting everything.

Step 2: Use a temporary diagnostic Pod

Create operations-lab. Save this as diagnostic.yaml and apply it:

apiVersion: v1
kind: Pod
metadata:
  name: network-inspector
  namespace: operations-lab
spec:
  restartPolicy: Never
  activeDeadlineSeconds: 900
  automountServiceAccountToken: false
  containers:
    - name: tools
      image: busybox:1.37.0
      command: ["sh", "-c", "sleep 900"]
      securityContext:
        allowPrivilegeEscalation: false
        capabilities:
          drop: ["ALL"]
      resources:
        requests:
          cpu: 10m
          memory: 16Mi
        limits:
          memory: 32Mi

Use it only to test paths you are authorized to reach. Remove the diagnostic Pod when finished; do not leave extra access running indefinitely.

Step 3: Plan and perform node maintenance

Check PodDisruptionBudgets, available capacity and local data first. During an approved maintenance window:

kubectl cordon worker1
kubectl drain worker1 --ignore-daemonsets --timeout=120s
# After the planned maintenance and node checks:
kubectl uncordon worker1

Cordon prevents new placement; drain requests eviction of existing workload Pods. A blocked drain may be protecting availability or local data. Do not add force or delete-data flags without understanding what will be lost.

Step 4: Follow the supported upgrade procedure

Read the kubeadm upgrade instructions for the exact source and target versions. Back up etcd and application data, check version-skew rules, update the control plane first, and then work through workers one at a time. Run kubeadm upgrade plan before choosing the upgrade commands.

Check the result

After maintenance, check node readiness, networking, storage and a real application request. An updated package version alone does not prove a working cluster. Do not uncordon a node that still fails its checks.

References

PB
Written by

Parul Bedi

Notes and guides by Parul Bedi.

Up next

Install SonarQube on Ubuntu Step by Step

Sonar November 30, 2026 4 min read
Open post

Conversation

0 comments

No comments yet. Start the conversation below.

Leave a comment

Replying to a comment.
Be kind. Markdown is not supported in comments.