0
0
Kubernetesdevops~5 mins

Kubernetes architecture (control plane and nodes) - Commands & Configuration

Choose your learning style9 modes available
Introduction
Kubernetes helps run many applications on many computers easily. It does this by splitting work between a control center and worker computers called nodes. This setup keeps apps running smoothly and lets you add or fix computers without stopping everything.
When you want to manage many app copies across several computers automatically
When you need to fix or add computers without stopping your app
When you want a central place to control how apps run on many machines
When you want to keep apps running even if some computers fail
When you want to organize computers into groups for different tasks
Commands
This command shows all the worker computers (nodes) connected to the Kubernetes control plane. It helps you see which computers are ready to run apps.
Terminal
kubectl get nodes
Expected OutputExpected
NAME STATUS ROLES AGE VERSION worker-node1 Ready <none> 10d v1.27.3 worker-node2 Ready <none> 10d v1.27.3
This command lists all running app parts (pods) in all groups (namespaces). It shows what the control plane is managing on the nodes.
Terminal
kubectl get pods -A
Expected OutputExpected
NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-66bff467f8-7x9q2 1/1 Running 0 10d kube-system kube-proxy-worker-node1 1/1 Running 0 10d
-A - Show pods in all namespaces
This command shows the main addresses of the Kubernetes control plane components. It helps confirm the control center is running and reachable.
Terminal
kubectl cluster-info
Expected OutputExpected
Kubernetes control plane is running at https://192.168.1.100:6443 CoreDNS is running at https://192.168.1.100:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Key Concept

If you remember nothing else from this pattern, remember: Kubernetes splits control tasks to the control plane and runs apps on worker nodes to keep everything organized and reliable.

Common Mistakes
Trying to run app containers directly on nodes without using Kubernetes pods
This bypasses Kubernetes management, causing loss of benefits like automatic restarts and scaling
Always deploy apps as pods managed by Kubernetes through manifests or commands
Ignoring node status and assuming all nodes are ready
If nodes are NotReady, apps won't run properly and may fail silently
Use 'kubectl get nodes' regularly to check node health before deploying apps
Summary
Use 'kubectl get nodes' to see all worker computers ready to run apps.
Use 'kubectl get pods -A' to view all app parts running across the cluster.
Use 'kubectl cluster-info' to check the control plane's main addresses and status.