kubectl
Browse all articles, tutorials, and guides about kubectl
Posts
The 5-Minute Kubernetes Cluster Health Check
Learn how to quickly assess your Kubernetes cluster's health with essential commands and catch issues before they become critical problems.
How Can I Trigger a Kubernetes Scheduled Job Manually?
Run a Kubernetes CronJob now with kubectl create job --from, wait for it and read its logs, change it for one run, and check the CronJob settings that decide when it runs.
How to Get Logs From All Pods, Events and Files With kubectl
Read the logs of every pod of a Deployment or ReplicationController at once, follow them live, see the events of one pod, and copy files out of a pod with kubectl.
Ingress vs Load Balancer in Kubernetes, Pending IPs and port-forward
When to expose a Service with a LoadBalancer, an Ingress or Gateway API, why EXTERNAL-IP stays pending, and how kubectl port-forward reaches a pod without exposing it.
How to Fix Pods Stuck in Terminating and Delete All Resources
Why a pod or namespace stays in Terminating, when a force delete is safe, how to handle finalizers, down nodes and volumes, and how to list or delete all resources and pods.
kubectl apply vs kubectl create, and How to Export Live YAML
Learn when to use kubectl apply, create, replace and server-side apply, how apply decides what to change, and how to get clean YAML from a resource that already runs.
Why Does a Deleted Kubernetes Pod Get Recreated? Deployments, Images
A deleted pod comes back because a controller owns it. Find and stop that controller, compare pods, Deployments and StatefulSets, update or re-pull an image, and debug ImagePullBackOff.
Kubernetes API - Get Pods on Specific Nodes
Learn how to list the pods on one node, or every pod with its node, with kubectl field selectors, custom columns and direct calls to the Kubernetes API.
How to Manage Kubernetes Environments: Namespaces, Contexts, Clusters
Separate staging, QA and production with namespaces or clusters, switch kubectl between namespaces and clusters such as GKE and minikube, reach Services in other namespaces, and sign in to a cluster web UI.
How to Restart, List and Keep Containers Running in a Kubernetes Pod
Kubernetes has no command to restart one container. Learn the ways that work, how to restart pods after a ConfigMap or Secret change, how to list containers, run several commands, keep a container running, and use local images.