- Namespaces
- List all namespaces:
kubectl get namespace
- Set a namespace:
kubens <namespace-name>
- See currently set namespace: kubens -c
- List all namespaces:
- Pods
- List all pods:
kubectl get pods
- List all pods in specific namespace:
kubectl get pods -n <namespace>
- Kill a pod:
kubectl delete pod <pod-name>
- Describe/get details of pod:
kubectl describe pods <pod-name>
- InitContainers
- Get logs: First describe the pod and look for the name of the init container. Then run
kubectl logs <pod-name> -c <init-container-name>
- Get logs: First describe the pod and look for the name of the init container. Then run
- List all pods:
- Deployments
- Get the manifest for a
Category: Kubernetes
helm Cheat Sheet
Development Tips and Tricks
Test Template Rendering
Run the following. Instead of it installing the chart it will render the template and display the output
helm install --debug --dry-run <release-name> <path-to-chart-dir>
To test with an overriding value
helm install <release-name> <path-to-chart-dir> --dry-run --debug --set k=v
Deployments
- List releases:
helm list
- Get the manifest for a release:
helm get manifest <release-name[flags]