Advertisement
sandervanvugt

CKAD august 22 day1

Aug 22nd, 2022
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. student@student-virtual-machine:~/ckad$ history
  2. 1 minikube start --vm-driver=docker
  3. 2 kubectl get all
  4. 3 history
  5. 4 kubectl get all
  6. 5 minikube status
  7. 6 kubectl get all
  8. 7 minikube --help
  9. 8 minikube ssh
  10. 9 minikube dashboard
  11. 10 bg
  12. 11 kubectl get all
  13. 12 ./countdown 15
  14. 13 kubectl get all
  15. 14 kubectl get all -o wide
  16. 15 kubectl --help | less
  17. 16 kubectl completion --help
  18. 17 kubectl completion --help | less
  19. 18 source <(kubectl completion bash)
  20. 19 cd
  21. 20 ls -a
  22. 21 cd .kube/
  23. 22 ls
  24. 23 cat config
  25. 24 pwd
  26. 25 kubectl config view
  27. 26 cd
  28. 27 cd ckad/
  29. 28 ls
  30. 29 cd dockerfile/
  31. 30 ls
  32. 31 vim Dockerfile
  33. 32 docker run -t mymap .
  34. 33 docker build -t mymap .
  35. 34 docker images
  36. 35 cd ..
  37. 36 docker run mymap
  38. 37 docker run -it mymap sh
  39. 38 cd dockerfile/
  40. 39 vim Dockerfile
  41. 40 docker build -t taketwo .
  42. 41 docker run taketwo
  43. 42 docker run -it taketwo sh
  44. 43 minikube ssh
  45. 44 kubectl get pods
  46. 45 kubectl get pods imback-7f9f7d658b-kkjqt -o yaml | less
  47. 46 kubectl get all
  48. 47 kubectl delete pod imback-7f9f7d658b-kkjqt
  49. 48 kubectl get all
  50. 49 kubectl run -h | less
  51. 50 kubectl run hazelcast --image=hazelcast/hazelcast --port=5701
  52. 51 kubectl get pods
  53. 52 kubectl describe pod hazelcast
  54. 53 kubectl get pods
  55. 54 history
  56. 55 kubectl delete pod hazelcast
  57. 56 kubectl get pods
  58. 57 cd ..
  59. 58 ./countdown 12
  60. 59 history
  61. 60 kubectl run hazelcast --image=hazelcast/hazelcast --port=5701
  62. 61 history
  63. 62 kubectl get pods
  64. 63 kubectl get pods hazelcast -o yaml | less
  65. 64 kubectl describe pods hazelcast
  66. 65 kubectl describe pods hazelcast | less
  67. 66 kubectl run mydb --image=mariadb
  68. 67 kubectl get pods
  69. 68 kubectl describe pods mydb
  70. 69 kubectl logs mydb
  71. 70 kubectl get pods
  72. 71 history
  73. 72 kubectl get pods hazelcast -o yaml | less
  74. 73 kubectl explain pod.spec | less
  75. 74 kubectl run hazelcast --image=hazelcast/hazelcast --port=5701 --dry-run=client -o yaml
  76. 75 kubectl run hazelcast --image=hazelcast/hazelcast --port=5701 --dry-run=client -o yaml > hazelcast.yam l
  77. 76 vim hazelcast.yam
  78. 77 kubectl explain pods.spec | less
  79. 78 kubectl create deploy sadep --image=nginx --replicas=3 --dry-run=client -o yaml
  80. 79 vim hazelcast.yam
  81. 80 kubectl get pods hazelcast -o yaml | less
  82. 81 kubectl get pods hazelcast -o yaml > hazelnut.yaml
  83. 82 vim hazelnut.yaml
  84. 83 history
  85. 84 ./countdown 1
  86. 85 kubectl run --help | less
  87. 86 kubectl run dryrun --image=nginx --dry-run=server -o yaml
  88. 87 kubectl get pods
  89. 88 kubectl run dryrun --image=nginx --dry-run=server -o yaml
  90. 89 vim sidecar.yaml
  91. 90 kubectl create -f sidecar.yaml
  92. 91 kubectl get pods
  93. 92 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
  94. 93 vim morevolumes.yaml
  95. 94 ./countdown 12
  96. 95 vim init-example1.yaml
  97. 96 kubectl create -f init-example1.yaml
  98. 97 kubectl get pods
  99. 98 vim init-example2.yaml
  100. 99 kubectl create -f init-example2.yaml
  101. 100 kubectl get pods
  102. 101 kubectl get ns
  103. 102 kubectl get pods
  104. 103 kubectl get pods -n kube-system,
  105. 104 kubectl get pods -n kube-system
  106. 105 kubectl create namespace mynamespace
  107. 106 kubectl run myhttp --image=httpd -n mynamespace
  108. 107 kubectl get pods
  109. 108 kubectl get pods -n mynamespace
  110. 109 kubectl config set-context --current --namespace=mynamespace
  111. 110 kubectl get pods
  112. 111 kubectl config set-context --current --namespace=default
  113. 112 kubectl get pods
  114. 113 history
  115. 114 kubectl get pods -A
  116. 115 kubectl exec -it hazelcast -- sh
  117. 116 kubectl explain pods.spec.securitycontext
  118. 117 kubectl explain pods.spec | less
  119. 118 kubectl explain pods.spec.securityContext
  120. 119 vim securitycontextdemo2.yaml
  121. 120 kubectl create -f securitycontextdemo2.yaml
  122. 121 kubectl exec -it security-context-demo -- sh
  123. 122 cat securitycontextdemo2.yaml
  124. 123 kubectl apply -f securitycontextdemo.yaml
  125. 124 kubectl get pods
  126. 125 vim securitycontextdemo.yaml
  127. 126 kubectl describe pods nginxsecure
  128. 127 kubectl create job onejob --image=busybox -- date
  129. 128 kubectl get jobs
  130. 129 kubectl get pods
  131. 130 kubectl get jobs onejob -o yaml | less
  132. 131 kubectl delete job onejob
  133. 132 kubectl create job mynewjob --image=busybox --dry-run=client -o yaml -- sleep 5 > mynewjob.yaml
  134. 133 vim mynewjob.yaml
  135. 134 kubectl create -f mynewjob.yaml
  136. 135 kubectl get jobs,pods
  137. 136 history
  138.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement