Kubernetes
Kubernetes is an open-source container-orchestration system for automating computer application deployment, scaling, and management.
Use kubectl commands
List all running pods
kubectl get pods
# list pods in all namespaces
kubectl get pods -ADelete pod
kubectl delete po demo-889bb54fc-4brqx
# force pod deletion
kubectl delete po demo-889bb54fc-4brqx --grace-period 0 --force Flush Kubernetes DNS
kubectl scale deployment.apps/coredns -n kube-system --replicas=0
kubectl scale deployment.apps/coredns -n kube-system --replicas=2Get last 50 updated pods
Get all pods that are not in "Running" state
Get logs for pods
Delete pod in case it is stuck in "terminating"
Port Forwarding
Get all K8s worker nodes
Copy file from/to Pod
Debug DNS inside a Kubernetes cluster
Last updated