Advertisement
sandervanvugt

CKAD june23 day1

Jun 20th, 2023
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.36 KB | None | 0 0
  1. student@student-virtual-machine:~/ckad$ history
  2. 1 history
  3. 2 minikube start --vm-driver=docker --cni=calico
  4. 3 kubectl get all
  5. 4 ./countdown 2
  6. 5 minikube dashboard
  7. 6 source <(kubectl completion bash)
  8. 7 kubectl create deploy apptwo --image=nginx --replicas=3
  9. 8 kubectl get all
  10. 9 history
  11. 10 ./countdown 15
  12. 11 kubectl get all
  13. 12 kubectl delete pod appone-dcc78d77f-mrz5r
  14. 13 kubectl get all
  15. 14 kubectl create deploy appthree --image=nginx
  16. 15 kubectl get all
  17. 16 kubectl create -h
  18. 17 kubectl create -h | less
  19. 18 kubectl create deploy -h | less
  20. 19 kubectl completion -h | less
  21. 20 kubectl get pods
  22. 21 kubectl get pods appthree-dd4b5fc5d-vsmc4 -o yaml | less
  23. 22 ls
  24. 23 cd dockerfile/
  25. 24 ls
  26. 25 vim Dockerfile
  27. 26 docker build -t centmap:1.0 .
  28. 27 docker images
  29. 28 cd ..
  30. 29 ls
  31. 30 cd alpmap/
  32. 31 ls
  33. 32 vim Containerfile
  34. 33 docker build -t alpmap .
  35. 34 mv Containerfile Dockerfile
  36. 35 docker build -t alpmap .
  37. 36 touch sander.repo
  38. 37 docker build -t alpmap .
  39. 38 docker images
  40. 39 docker save alpmap
  41. 40 docker save --help | less
  42. 41 docker save alpmap -o alpmap.tgz
  43. 42 ls -l alpmap.tgz
  44. 43 file alpmap.tgz
  45. 44 kubectl explain pod.spec | less
  46. 45 kubectl get all
  47. 46 kubectl delete pod appthree-dd4b5fc5d-vsmc4
  48. 47 kubectl get all
  49. 48 kubectl run alone --image=nginx
  50. 49 kubectl get all
  51. 50 kubectl delete pod alone
  52. 51 kubectl get all
  53. 52 history
  54. 53 kubectl run -h | less
  55. 54 kubectl get pods appthree-dd4b5fc5d-z58r2 -o yaml | less
  56. 55 kubectl describe pods appthree-dd4b5fc5d-z58r2 | less
  57. 56 cd ..
  58. 57 ./countdown 4
  59. 58 kubectl run busybox --image-busybox
  60. 59 kubectl run busybox --image=busybox
  61. 60 kubectl get pods
  62. 61 kubectl describe pod busybox
  63. 62 kubectl delete pod busybox
  64. 63 kubectl run busybox --image=busybox --restart=Never
  65. 64 kubectl get pods
  66. 65 ./countdown 12
  67. 66 kubectl get pods busybox -o yaml | less
  68. 67 ./countdown 12
  69. 68 kubectl explain pod
  70. 69 kubectl explain pod.spec
  71. 70 ls
  72. 71 vim busybox.yaml
  73. 72 kubectl run mynginx --image=nginx --dry-run=client -o yaml > mynginx.yaml
  74. 73 vim mynginx.yaml
  75. 74 kubectl create -f mynginx.yaml
  76. 75 kubectl remove -f mynginx.yaml
  77. 76 kubectl delete -f mynginx.yaml
  78. 77 kubectl apply -f mynginx.yaml
  79. 78 vim sidecar.yaml
  80. 79 kubectl apply -f sidecar.yaml
  81. 80 kubectl get pods
  82. 81 kubectl exec -it sidecar-pod -c sidecar -- /bin/bash
  83. 82 vim sidecar.yaml
  84. 83 vim bonuslab.txt
  85. 84 history
  86. 85 cat bonuslab.txt
  87. 86 cat sidecar.yaml
  88. 87 ls -lrt
  89. 88 history
  90. 89 cat bonuslab.txt
  91. 90 cat sidecard.yaml
  92. 91 vim init-example1.yaml
  93. 92 kubectl apply -f init-example1.yaml
  94. 93 kubectl get pods
  95. 94 vim init-example2.yaml
  96. 95 kubectl apply -f init-example2.yaml
  97. 96 kubectl get pods
  98. 97 kubectl describe pod init-demo2
  99. 98 kubectl get ns
  100. 99 kubectl get pods
  101. 100 kubectl get pods -A
  102. 101 kubectl create ns secret
  103. 102 kubectl run secretpod --image=nginx -n secret
  104. 103 kubectl get pods
  105. 104 kubectl get pods -n secret
  106. 105 kubectl config set-context --current --namespace=secret
  107. 106 kubectl get pods
  108. 107 kubectl config set-context --current -n default
  109. 108 kubectl config set-context --current --namespace=default
  110. 109 kubectl get pods
  111. 110 history
  112. 111 ./countdown 2
  113. 112 kubectl run faildb --image=mariadb
  114. 113 kubectl get pods
  115. 114 kubectl describe pod faildb | less
  116. 115 kubectl logs faildb
  117. 116 kubectl delete pod faildb
  118. 117 kubectl run faildb --image=mariadb --env MARIADB_ROOT_PASSWORD=password
  119. 118 kubectl get pods
  120. 119 kubectl run -h | less
  121. 120 kubectl explain --recursive pod.spec | less
  122. 121 kubectl explain pod.spec.containers | less
  123. 122 kubectl explain pod.spec.containers.securityContext
  124. 123 kubectl explain pod.spec.containers.securityContext | less
  125. 124 vim securitycontextdemo2.yaml
  126. 125 kubectl apply -f securitycontextdemo2.yaml
  127. 126 kubectl exec -it security-context-demo -- sh
  128. 127 kubectl apply -f securitycontextdemo.yaml
  129. 128 vim securitycontextdemo.yaml
  130. 129 kubectl get pods
  131. 130 kubectl describe pod nginxsecure
  132. 131 history
  133.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement