Advertisement
sandervanvugt

Untitled

Jan 11th, 2021
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.96 KB | None | 0 0
  1. 1 sudo dnf install -y vim bash-completion git
  2. 2 git clone https://github.com/sandervanvugt/ckad
  3. 3 cd ckad
  4. 4 ./kube-setup.sh
  5. 5 sudo reboot
  6. 6 cd ckad
  7. 7 cat kube-setup.sh
  8. 8 minikube start --memory 4096 --vm-driver=kvm2
  9. 9 sudo poweroff
  10. 10 minikube start --memory 4096 --vm-driver=kvm2
  11. 11 kubectl get all
  12. 12 ls
  13. 13 cd ckad/
  14. 14 ls
  15. 15 ls *pdf
  16. 16 cd ..
  17. 17 git clone https://github.com/sandervanvugt/kubernetes
  18. 18 cd kubernetes/
  19. 19 ls
  20. 20 cd ../ckad
  21. 21 vim kube-setup.sh
  22. 22 minikube status
  23. 23 minikube ip
  24. 24 minikube ssh
  25. 25 kubectl get all
  26. 26 kubectl get all -A
  27. 27 minikube stop
  28. 28 history
  29. 29 minikube start --memory 4096 --vm-driver=kvm2
  30. 30 minikube dashboard
  31. 31 minikube start
  32. 32 kubectl get all
  33. 33 kubectl completion -h
  34. 34 source <(kubectl completion bash)
  35. 35 kubectl create deployment -h | less
  36. 36 kubectl create deployment firstnginx --image=nginx --replicas=3
  37. 37 kubectl get all
  38. 38 kubectl delete pod firstnginx-8cdb8cd74-75zn8
  39. 39 kubectl get all
  40. 40 kubernetes get rs
  41. 41 kubectl get rs
  42. 42 kubectl delete rs dginx-65d77fbd77
  43. 43 kubectl get all
  44. 44 cd ckad/
  45. 45 ./countdown 12
  46. 46 minikube ssh
  47. 47 kubectl api-resources | less
  48. 48 ./countdown 2
  49. 49 kubectl api-resources | less
  50. 50 kubectl explain service
  51. 51 kubectl api-resources
  52. 52 kubectl api-versions
  53. 53 kubectl proxy --port=8001 &
  54. 54 curl http://localhost:8001/version
  55. 55 kubectl get pods
  56. 56 curl http://localhost:8001/api/v1/namespaces/default/pods
  57. 57 kubectl get pods
  58. 58 minikube start
  59. 59 minikubr status
  60. 60 minikube status
  61. 61 history
  62. 62 kubectl get pods
  63. 63 curl http://localhost:8001/api/v1/namespaces/default/pods/firstnginx-8cdb8cd74-ltlcf
  64. 64 kubectl proxu --port=8001 &
  65. 65 kubectl proxy --port=8001 &
  66. 66 curl http://localhost:8001/api/v1/namespaces/default/pods/firstnginx-8cdb8cd74-ltlcf
  67. 67 curl -XDELETE http://localhost:8001/api/v1/namespaces/default/pods/firstnginx-8cdb8cd74-ltlcf
  68. 68 kubectl get pods
  69. 69 cd .kube/
  70. 70 ls
  71. 71 less config
  72. 72 cd
  73. 73 kubectl config -h
  74. 74 kubectl config view
  75. 75 ckad/countdown 12
  76. 76 ckad/countdown 3
  77. 77 kubectl get pods
  78. 78 kubectl get pods -A
  79. 79 kubectl run ghost --image=host:0.9
  80. 80 kubectl get pods
  81. 81 kubectl run ghost --image=host:latest
  82. 82 kubectl get pods
  83. 83 kubectl edit pod ghost
  84. 84 sudo dnf install -y vim
  85. 85 export EDITOR=/usr/bin/vim
  86. 86 kubectl edit pod ghost
  87. 87 kubectl get pods
  88. 88 kubectl describe pod ghost
  89. 89 kubectl get pods
  90. 90 kubectl describe pod ghost
  91. 91 kubectl get pods
  92. 92 kubectl logs ghost
  93. 93 kubectl exec -it ghost -- sh
  94. 94 history
  95. 95 cd ckad
  96. 96 ls
  97. 97 vim busybox.yaml
  98. 98 kubectl api-resources | grep -i pod
  99. 99 vim busybox.yaml
  100. 100 kubectl create -f busybox.yaml
  101. 101 kubectl get pods
  102. 102 kubectl delete pods busybox2
  103. 103 kubectl get pods
  104. 104 kubectl run busypod --image=busybox --restart=Never --command -- /bin/sh --dry-run=client -o yaml > busypod.yaml
  105. 105 vim busypod.yaml
  106. 106 kubectl delete pod busybox --force
  107. 107 kubectl delete pod busypod --force
  108. 108 kubectl run busypod --image=busybox --restart=Never --dry-run=client --command -- /bin/sh -o yaml > busypod.yaml
  109. 109 vim busypod.yaml
  110. 110 kubectl delete pod busypod --force
  111. 111 kubectl run busypod --image=busybox --restart=Never --dry-run=client -o yaml --command -- /bin/sh > busypod.yaml
  112. 112 vim busypod.yaml
  113. 113 history
  114. 114 vim busybox.yaml
  115. 115 ls
  116. 116 vim busypod.yaml
  117. 117 kubectl explain pods.spec
  118. 118 history
  119. 119 kubectl get pods
  120. 120 kubectl get pods ghost -o yaml > ghost.yaml
  121. 121 vim ghost.yaml
  122. 122 kubectl delete pods ghost --force
  123. 123 kubectl apply -f ghost.yaml
  124. 124 ./countdown 12
  125. 125 vim sleepy.yaml
  126. 126 kubectl create -df sleepy.yaml
  127. 127 kubectl create -f sleepy.yaml
  128. 128 kubectl get pods
  129. 129 kubectl logs sleepy
  130. 130 vim sidecar.yaml
  131. 131 kubectl create -f sidecar.yaml
  132. 132 kubectl describe sidecar-pod
  133. 133 kubectl describe pod sidecar-pod
  134. 134 kubectl exec -it sidecar-pod -c sidecar /bin/bash
  135. 135 vim initpod.yaml
  136. 136 kubectl create -f initpod.yaml
  137. 137 kubectl get pods
  138. 138 kubectl explain pod.spec | less
  139. 139 kubectl get events
  140. 140 ./countdown 0
  141. 141 kubectl get pods
  142. 142 kubectl describe init-demo
  143. 143 kubectl describe pod init-demo
  144. 144 kubectl logs init-demo
  145. 145 kubectl logs init-demo -c install
  146. 146 vim initpod.yaml
  147. 147 kubectl replace -f initpod.yaml
  148. 148 kubectl get pdos
  149. 149 kubectl delete pods init-demo
  150. 150 kubectl create -f initpod.yaml
  151. 151 kubectl get pods -w
  152. 152 kubectl logs init-demo -c install
  153. 153 kubectl delete -f initpod.yaml
  154. 154 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement