Kubernetes pods

Konstantinos Blatsoukas - Oct 30 - - Dev Community

Image description

Image description



Pod status:               kubectl get pods
Pod deletion:             kubectl delete pods/kuard
                          kubectl delete -f kuard-pod.yaml
Run a pod  (manifest):    kubectl apply -f kuard-pod.yaml
Listing pods:             kubectl get pods # -o yaml or -o wide
Pod details:              kubectl describe pods <pod-name>
port-forwarding:          kubectl port-forward <pod-name> 8080:8080
Pod logs:                 kubectl logs <pod-name> # with -f you can stream logs, 
                          #--previous if the pods are restarting
executing cmds:           kubectl exec <pod-name> date
                          kubectl exec -it <pod-name> ash
copying files:            kubectl cp <pod-name>:/captures/capture3.txt ./capture3.txt
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player