Pod -Creation ,Remove,View,Describe,State

Pod (k8s)


The pod is defined as", the object of kubernetes called pod , is a encapsuled of containers, used to handle the containers created by using replicaset.pod is the set of multiple containers schedule on same physical or virtual machine ''

  • Pod is basic object 
  • The thing is that we can not handle multiple containers directly.
  • If you run a docker container in kubernetes object you need a pod.



Create a pod using commands




step1 kubect run pod name image_image_name tag 

example

                        kubectl run php-pod --image php:8-apache

step2 to verify or view pods 

                        kubectl get pods 

 create a pod by using pod configuration or yaml file 

step1 crate a yml or yaml file

                       vi yaml.yaml

step2 applying the configuration 

                         kubectl apply f darwin. yml

step3 to verify or view pods

                      kubectl get pods-w

                      kubectl describe pods




Note
 - If you want updating pod,then is possible by changing specification of pod yml or yaml file change the specification again apply the yaml or yml file by

                     kubectl apply -f g. yaml 

 Terminating or deleting the pod 

to clean up your cluster , you delete the pod by 

                     kubectl delete pod <podname>



 

Comments

Popular Posts