Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 mkdir -p $HOME/.kube
- 2 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
- 3 ls -l .kube/config
- 4 sudo chown student:student .kube/config
- 5 kubectl get all
- 6 kubectl apply -f https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')
- 7 kubectl get nodes
- 8 kubectl get pods
- 9 kubectl get pods -n kube-system
- 10 kubectl edit node kubeaio.example.com
- 11 kubectl get ndoes
- 12 kubectl get nodes
- 13 kubectl edit node kubaio.example.com
- 14 kubectl get all
- 15 kubectl --help | less
- 16 kubectl completion -h | less
- 17 source <(kubectl completion bash)
- 18 kubectl create -h | less
- 19 kubectl create deployment -h | less
- 20 kubectl create deployment firstnginx --image=nginx --replicas=3
- 21 kubectl get all
- 22 kubectl delete pods firstnginx-8cdb8cd74-fgxrl
- 23 kubectl get all
- 24 kubectl version
- 25 history
- 26 kubectl get pods
- 27 kubectl get pods -n kube-system
- 28 ps aux | grep etcd
- 29 kubectl run -h | less
- 30 kubectl run nginx --image=nginx
- 31 kubectl get all
- 32 kubectl scale -h | less
- 33 kubectl delete pod nginx
- 34 kubectl get pods
- 35 git clone https://github.com/sandervanvugt/kubernetes
- 36 cd kubernetes/
- 37 ./countdown 12
- 38 kubectl explain pod
- 39 kubectl explain pod.spec | less
- 40 kubectl run nginx2 --image=nginx
- 41 kubectl get pods
- 42 ls
- 43 vim busybox.yaml
- 44 kubectl get pods
- 45 kubectl explain pods
- 46 vim busybox.yaml
- 47 kubectl explain.spec.containers pods
- 48 kubectl explain.spec.container pods
- 49 kubectl explain pod spec.container
- 50 kubectl explain pod spec.containers
- 51 kubectl explain pods
- 52 kubectl explain pods.spec
- 53 kubectl explain pods.spec | less
- 54 kubectl explain pods.spec.containers | less
- 55 vim busybox.yaml
- 56 kubectl create -f busybox.yaml
- 57 kubectl get pods
- 58 kubectl describe pods
- 59 kubectl describe pods busybox2 | less
- 60 kubectl get pods
- 61 kubectl get pods nginx2 -o yaml > nginx2.yaml
- 62 vim nginx2.yaml
- 63 kubectl replace -f nginx2.yaml
- 64 kubectl delete pods nginx2
- 65 kubectl apply -f nginx2.yaml
- 66 kubectl run mypod --image=nginx --dry-run=client -o yaml > mypod.yaml
- 67 vim mypod.yaml
- 68 kubectl run -h | less
- 69 kubectl get ns
- 70 kubectl get all -n kube-system
- 71 kubectl create ns secret
- 72 kubectl get ns
- 73 vim busybox.yaml
- 74 kubectl create -f busybox.yaml
- 75 kubectl get pods
- 76 kubectl get pods -n secret
- 77 kubectl get pods -A
- 78 cd ../.kube/
- 79 ls
- 80 vim config
- 81 cd
- 82 kubectl create deployment -h | less
- 83 kubectl create deployment my-dep --image=busybox
- 84 kubectl get pods
- 85 kubectl describe pod my-dep-68d7dcffc4-4r7lh
- 86 kubectl delete deployments.apps my-dep
- 87 kubectl create deployment -h | less
- 88 kubectl create deployment my-dep --image=busybox -- sleep 3600
- 89 kubectl create deployment my-dep2 --image=busybox sleep 3600
- 90 kubectl create deployment --image=mariadb mymariadb
- 91 kubectl config set-context --current --namespace=secret
- 92 kubectl get pods
- 93 kubectl config set-context --current --namespace=default
- 94 kubectl get pods
- 95 kubectl describe pod mymariadb-58b96cb658-nq7vl
- 96 kubectl logs mymariadb-58b96cb658-nq7vl
- 97 kubectl exec -it busybox2 -- /bin/sh
- 98 kubectl logs mymariadb-58b96cb658-nq7vl -o json
- 99 cd kubernetes/
- 100 ./countdown 12
- 101 kubectl get all
- 102 kubectl get all --show-labels
- 103 kubectl get all --selector app=firstnginx
- 104 kubectl get deploy --show-labels
- 105 kubectl get all --selector app=firstnginx
- 106 kubectl label pod firstnginx-8cdb8cd74-hbzhb app-
- 107 kubectl get pods
- 108 kubectl create deployment nginxsvc --image=nginx
- 109 kubectl scale deployment nginxsvc --replica=3
- 110 kubectl scale deployment nginxsvc --replicas=3
- 111 kubectl get all --selector app=nginxsvc
- 112 kubectl expose deployment nginxsvc --port=80
- 113 kubectl get all --selector app=nginxsvc
- 114 kubectl describe svc nginxsvc
- 115 kubectl get pods -o wide --selector app=nginxsvc
- 116 kubectl scale deployment nginxsvc --replicas=5
- 117 kubectl get pods -o wide --selector app=nginxsvc
- 118 kubectl describe svc nginxsvc
- 119 oc get endpoints
- 120 kubectl get endpoints
- 121 ip
- 122 ip a
- 123 curl 192.168.4.13
- 124 curl http://192.168.4.13
- 125 kubectl get svc
- 126 curl http://10.111.122.241
- 127 kubectl get svc
- 128 kubectl edit svc nginxsvc
- 129 kubectl get svc
- 130 curl http://192.168.4.13:32000
- 131 vim volumes.yaml
- 132 kubectl create -f volumes.yaml
- 133 vim volumes.yaml
- 134 kubectl get pods
- 135 kubectl exec -it vol2 -c centos -- touch /test/myfile
- 136 kubectl exec -it vol2 -- touch /test/myfile
- 137 kubectl exec -it vol2 -- ls -l /test
- 138 kubectl explain pods.spec.volumes
- 139 kubectl explain pods.spec.volumes | less
- 140 vim volumes.yaml
- 141 history
Add Comment
Please, Sign In to add comment