Advertisement
sandervanvugt

CKAD day1 march21

Mar 15th, 2021
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. student@student-virtual-machine:~/ckad$ history
  2. 1 sudo apt install vim git
  3. 2 git clone https://github.com/sandervanvugt/ckad
  4. 3 cd ckad
  5. 4 sudo ls -l /root
  6. 5 ls
  7. 6 ./kube-setup.sh
  8. 7 sudo reboot
  9. 8 cd ckad/
  10. 9 cat kube-setup.sh
  11. 10 minikube start --memory 4096 --vm-driver=kvm2
  12. 11 kubectl get all
  13. 12 history
  14. 13 free -m
  15. 14 sudo grep vmx /proc/cpuinfo
  16. 15 free -m
  17. 16 df -h
  18. 17 ls
  19. 18 vim kube-setup.sh
  20. 19 vim other-options.txt
  21. 20 minikube -h
  22. 21 minikube status
  23. 22 minikube ssh
  24. 23 kubectl get all
  25. 24 minikube dashboard
  26. 25 bg
  27. 26 ./countdown 12
  28. 27 kubectl get all
  29. 28 kubectl delete pod myfirstnginx-bc9b6d4d7-g9fz2
  30. 29 kubectl get all
  31. 30 kubectl -h
  32. 31 kubectl completion -h
  33. 32 source <(kubectl completion bash)
  34. 33 kubectl create deployment newnginx --image=nginx -h
  35. 34 kubectl create deployment newnginx --image=nginx --replicase=3
  36. 35 kubectl create deployment newnginx --image=nginx --replicas=3
  37. 36 kubectl get all
  38. 37 kubectl version
  39. 38 history
  40. 39 kubectl api-resources | less
  41. 40 kubectl explain priorityclasses
  42. 41 kubectl explain priorityclasses | less
  43. 42 kubectl -h | less
  44. 43 kubectl -h |less
  45. 44 kubectl api-resources | less
  46. 45 kubectl api-versions | less
  47. 46 kubectl explain pod | less
  48. 47 history
  49. 48 ./countdown 12
  50. 49 kubectl proxy --port=8001 &
  51. 50 curl http://localhost:8001/version
  52. 51 kubectl get pods
  53. 52 curl http://localhost:8001/api/v1/namespaces/default/pods
  54. 53 curl http://localhost:8001/api/v1/namespaces/default/pods/newnginx-757c575454-8x76n/
  55. 54 curl -XDELETE http://localhost:8001/api/v1/namespaces/default/pods/newnginx-757c575454-8x76n/
  56. 55 kubectl get pods
  57. 56 kubectl -h | less
  58. 57 kubectl completion -h | less
  59. 58 kubectl explain pod
  60. 59 kubectl explain pod.spec
  61. 60 kubectl explain pod.spec | less
  62. 61 kubectl run -h | less
  63. 62 kubectl run nginx --image=nginx
  64. 63 kubectl get all
  65. 64 kubectl delete pod newnginx-757c575454-zft7m
  66. 65 kubectl get all
  67. 66 kubectl delete pod nginx
  68. 67 kubectl get all
  69. 68 kubectl scale deployment --replicas=4 newnginx
  70. 69 kubectl get all
  71. 70 kubectl delete deployments.apps myfirstnginx
  72. 71 kubectl run --image=mariadb
  73. 72 kubectl run mydb --image=mariadb
  74. 73 kubectl get pods
  75. 74 kubectl describe pod mydb
  76. 75 kubectl logs mydb
  77. 76 kubectl run -h | less
  78. 77 kubectl run mydb --image=mariadb --env=MYSQL_ROOT_PASSWORD=password
  79. 78 kubectl delete pod mydb
  80. 79 kubectl run mydb --image=mariadb --env=MYSQL_ROOT_PASSWORD=password
  81. 80 kubectl get pod
  82. 81 history
  83. 82 ls
  84. 83 vim busybox.yaml
  85. 84 kubectl create -f busybox.yaml
  86. 85 kubectl get pods
  87. 86 vim busybox.yaml
  88. 87 kubectl api-resources | less
  89. 88 kubectl explain pods
  90. 89 kubectl explain pods.spec
  91. 90 kubectl explain pods.spec | less
  92. 91 kubectl explain pods.spec.containers
  93. 92 kubectl explain --recursive pods.spec.containers
  94. 93 ./countdown 12
  95. 94 vim busybox.yaml
  96. 95 kubectl create -f busybox.yaml
  97. 96 vim busybox.yaml
  98. 97 kubectl create -f busybox.yaml
  99. 98 vim busybox.yaml
  100. 99 kubectl create -f busybox.yaml
  101. 100 kubectl run mywhatever --image=nginx --dry-run=client -o yaml > whatever.yaml
  102. 101 vim whatever.yaml
  103. 102 kubectl run busypod --image=busybox --restart=Never --command -- /bin/sh
  104. 103 kubectl get pods
  105. 104 kubectl get pods busypod -o yaml > busypod.yaml
  106. 105 vim busypod.yaml
  107. 106 kubectl run busypod --image=busybox --restart=Never --dry-run=client -o yaml --command -- /bin/sh
  108. 107 vim ~/.vimrc
  109. 108 vim sidecar.yaml
  110. 109 kubectl create -f sidecar.yaml
  111. 110 kubectl get pods
  112. 111 history
  113.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement