This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#It's a list of objects, so let's display the pod names | |
kubectl get pods -l app=hello-world -o jsonpath='{ .items[*].metadata.name }' | |
#Display all pods names, this will put the new line at the end of the set rather then on each object output to screen. | |
#Additional tips on formatting code in the examples below including adding a new line after each object | |
kubectl get pods -l app=hello-world -o jsonpath='{ .items[*].metadata.name }{"\n"}' | |
#It's a list of objects, so let's display the first (zero'th) pod from the output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Basics | |
# docker container run hello-world | |
# docker image ls | |
# docker ps | |
# docker container ls | |
# docker container ls -a | |
# docker container run -ti centos:7 | |
# docker container run -ti ubuntu | |
# docker container -d nginx | |
# docker container attach [CONTAINER ID] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEBUG | |
kubectl get pods -n “namespace” | |
kubectl get services | |
kubectl get pods -n “namespace ”-o wide | |
kubectl logs {pod-name} | |
kubectl exec -it {pod-name} -- bin/bash | |
get all pods from all namespaces | |
kubectl get all -n namespace | |
kubectl describe endpoins |