Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [student@control .kube]$ history
- 1 mkdir .kube
- 2 sudo cp -i /etc/kubernetes/admin.conf .kube/config
- 3 sudo chown student:student .kube/config
- 4 kubectl get all
- 5 kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
- 6 kubectl get pods -n kube-system
- 7 exit
- 8 kubectl get nodes
- 9 ssh 192.168.29.125
- 10 kubectl get nodes
- 11 exit
- 12 kubectl create -h | less
- 13 kubectl create ns -h | less
- 14 kubectl create ns mynamespace
- 15 kubectl run -n mynamespace alpine --image=alpine --restart=Never -- /bin/sh -c 'sleep 3600'
- 16 kubectl get pods
- 17 kubectl get pods -n mynamespace
- 18 kubectl get pods -o yaml -n mynamespace | less
- 19 kubectl delete pods alpine -n mynamespace
- 20 kubectl run -n mynamespace alpine --image=alpine --restart=Always -- /bin/sh -c 'sleep 3600'
- 21 kubectl get pods -n mynamespace
- 22 kubectl edit pod alpine -n mynamespace
- 23 kubectl completion -h | less
- 24 source <(kubectl completion bash)
- 25 git clone https://github.com/sandervanvugt/cka
- 26 cka/counter.sh 15
- 27 kubectl run busybox --image=busybox
- 28 kubectl get pods
- 29 kubectl describe pod busybox
- 30 vim jc.yaml
- 31 kubectl run -h |
- 32 kubectl run -h |less
- 33 kubectl run busyfox --image=busybox --dry-run=client -o yaml --command -- sleep 3600
- 34 kubectl create ns restricted
- 35 kubectl create -h | less
- 36 kubectl create quota -h | less
- 37 kubectl create quota restricted --hard pods=3,memory=1Gi -n restricted
- 38 kubectl describe quota restricted
- 39 kubectl describe quota restricted -n restricted
- 40 kubectl describe ns restricted
- 41 kubectl create deployment newginx --image=nginx --replicas=3
- 42 kubectl get all -n restricted
- 43 kubectl delete deployments.apps newginx
- 44 kubectl create deployment newginx --image=nginx --replicas=3 -n restricted
- 45 kubectl get all -n restricted
- 46 kubectl describe replicasets.apps newginx-645dff97c6 -n restricted
- 47 kubectl get all -n restricted
- 48 kubectl set -h | less
- 49 kubectl set resources -h | less
- 50 #kubectl set resources deployment nginx --limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi
- 51 kubectl set resources -n restricted deploy newginx --limits=memory=512Mi --requests=memory=256Mi
- 52 kubectl get all -n restricted
- 53 kubectl describe -n restricted
- 54 kubectl describe ns -n restricted
- 55 kubectl scale deploy newginx -n restricted --replicas=4
- 56 kubectl get all -n restricted
- 57 kubectl -n restricted describe rs newginx-584559b6d
- 58 history
- 59 kubectl set resources -h | less
- 60 cka/counter.sh 20
- 61 cd cka/
- 62 vim nwpolicy-complete-example.yaml
- 63 kubectl explain networkpolicy.spec
- 64 kubectl explain --recursive networkpolicy.spec
- 65 vim nwpolicy-complete-example.yaml
- 66 kubectl create -f nwpolicy-complete-example.yaml
- 67 kubectl delete -f nwpolicy-complete-example.yaml
- 68 kubectl create -f nwpolicy-complete-example.yaml
- 69 kubectl get svc
- 70 kubectl expose pod nginx --port=80
- 71 kubectl get svc
- 72 kubectl get endpoints
- 73 kubectl get pods -o wide
- 74 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 75 kubectl get pods --show-labels
- 76 kubectl describe nwp
- 77 kubectl describe networkpolicy
- 78 kubectl label pod busybox access=true
- 79 kubectl exec -it busybox -- wget --spider --timeout=1 nginx
- 80 ./counter.sh 8
- 81 kubectl get nodes
- 82 kubectl taint -h | less
- 83 #kubectl taint nodes worker2.example.com key1=value1:NoExecute
- 84 kubectl get pods -o wide
- 85 kubectl taint nodes worker2.example.com key1=value1:NoExecute
- 86 kubectl get pods -o wide
- 87 kubectl create deploy -h | less
- 88 kubectl explain deploy.spec | less
- 89 kubectl explain --recursive deploy.spec | less
- 90 kubectl create deploy -h | less
- 91 kubectl create deploy idontcare --image=nginx --replicas=3 --dry-run=client -o yaml > idont.yaml
- 92 vim idont.yaml
- 93 kubectl create -f idont.yaml
- 94 kubectl get pods -o wide
- 95 kubectl taint nodes worker2.example.com key1=value1:NoExecute-
- 96 kubectl get pods -o wide -A
- 97 ./counter.sh 15
- 98 ssh root@worker2
- 99 kubectl get pods
- 100 ssh root@worker2
- 101 kubectl describe nodes control.example.com
- 102 kubectl describe nodes control.example.com | less
- 103 kubectl taint node control.example.com node-role.kubernetes.io/master:NoSchedule-
- 104 kubectl taint node control.example.com node-role.kubernetes.io/master:NoSchedule
- 105 kubectl set resources -h
- 106 kubectl create deployment -h | less
- 107 cd
- 108 cd .kube/
- 109 rm config
- 110 exit
- 111 kubectl get all
- 112 kubectl config -h
- 113 kubectl config view
- 114 cd .kube/
- 115 ls
- 116 sudo cp /etc/kubernetes/admin.conf config
- 117 ls -l
- 118 sudo chown student:student config
- 119 cd
- 120 kubectl get all
- 121 kubectl config view
- 122 cd .kube/
- 123 vim config
- 124 history
- ROOT SHELL[root@control ~]# history
- 1 yum install -y vim git bash-completion
- 2 git clone https://github.com/sandervanvugt/cka
- 3 cd cka
- 4 ls
- 5 vim setup-container.sh
- 6 ./setup-container.sh
- 7 ./setup-docker.sh
- 8 ls
- 9 ./setup-kubetools.sh
- 10 history
- 11 kubeadm init
- 12 cd
- 13 vim clustersetup.txt
- 14 history
- 15 cka/counter.sh 12
- 16 ls
- 17 cat clustersetup.txt
- 18 su - student
- 19 cat clustersetup.txt
- 20 ssh 192.168.29.124
- 21 kubectl get nodes
- 22 exit
- 23 su - student
- 24 kubeadm token create -h | less
- 25 kubeadm token create --print-join-token
- 26 kubeadm token create -h | less
- 27 kubeadm token create --print-join-command
- 28 cd cka/
- 29 ls
- 30 vim setup-container.sh
- 31 vim setup-kub
- 32 vim setup-kubetools.sh
- 33 su - student
- 34 cd ..
- 35 ls
- 36 less clustersetup.txt
- 37 history
Add Comment
Please, Sign In to add comment