Docker
Check the Docker version
docker versionRun Hello World
docker run hello-worldDocker Details
docker ps -a
docker ps
docker images
docker info
Run Ubuntu
docker pull ubuntu
docker run -it ubuntu
$apt-get update
exit
docker container ls -all
Commit the Changes
docker commit -m "did a apt-get udpate" -a "authorName" funny_meninsky harshit/ubuntu-demoDocker Swarms
docker swarm init --advertise-addr 192.168.29.44:2377 --listen-addr 192.168.29.44:2377Did not work port errir
Install Minicube on Mac
brew install kubectl
brew install minikubeKuberenets Commands
# command structure
kubectl [command] [type] [name] [flags]
## Make local + external nodes visible
$ kubectl get nodes
## version of both local and client version
$ kubectl versionQ . Version difference between client and server version .
Get the Deployments (Only deployed)
$ kubectl get deploymentsGet pods both the deployed and un-deployed ones
$ kubectl get podsGet the Details of the Pod in YAML format
$ kubectl get pod <pod name> -o=yaml All the Details of pods and deployments etc .
$ kubectl get allGet all the namespace in cluster
$ kubectl get namespacesGet all the namespaces with Labels in the cluster
$ kubectl get namespaces --show-labelsCreate Namespace in cluster
Q . difference between context and namespace in context
$ kubectl Last updated
Was this helpful?