Some useful Kubernetes and Helm commands
By Tri Nguyen onIntro
In this post I would like to list some useful commands for using Kubernetes.
Kubernetes
Ref: kubectl Cheat Sheet
- Get cluster info
kubectl cluster-info
- List all pods
kubectl get po
- List all deployments
kubectl get deploy
- Get port of a pod
kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}
- Port forwarding
kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
Helm
- List all installtions
helm list
- Make an installation
helm install {release-name} {folder}
Comments
If you have any question, you can start a new discussion.