βΈοΈPod
Describe about What is Pod ?
It is the smallest instance in Kubernetes that running application. It has 1 or multiple containers inside in case that be helper container (helper container will be destroyed when the pod is destroyed).
CheatSheet Command
Get Pods :
kubectl get pods
Create Pod:
kubectl run <pod_name> --image=<image_name>
Describe information of Pod:
kubectl describe po <pod_name or container_name>
Delete Pod:
kubectl delete po <pod_name or container_name>
Create template for creating Pod
kubectl run <pod_name> --image=<image_name> --dry-run=client -o yaml > <file_name>.yaml
(this command only generated template file because of--dry-run=client
option)Check the apiVersion of the template:
kubectl explain po
Execute command from file
kubectl apply -f <file_name>.yaml
Create Pod using file definition:
Force edit pod:
kubectl replace --force -f <tmp_file_name>.yaml
Create pod with args:
kubectl run <pod_name> --image=<image_name> -- --color=green(example)
Last updated