Advertisement
sandervanvugt

kube3W march23 day1

Mar 10th, 2023
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.72 KB | None | 0 0
  1. student@control:~/kube3weeks$ history
  2. 1 exit
  3. 2 free -m
  4. 3 lscpu | less
  5. 4 df -h
  6. 5 git clone https://github.com/sandervanvugt/kube3weeks
  7. 6 cd kube3weeks/
  8. 7 ./countdown 15
  9. 8 ls -l *sh
  10. 9 cd ..
  11. 10 cd kube3weeks/
  12. 11 git pull
  13. 12 history
  14. 13 vim setup-container.sh
  15. 14 ./setup-container.sh
  16. 15 sudo systemctl status containerd
  17. 16 history
  18. 17 ./setup-kubetools.sh
  19. 18 sudo ./setup-kubetools.sh
  20. 19 sudo kubeadm init
  21. 20 mkdir -p $HOME/.kube
  22. 21 kubectl get all
  23. 22 ls cal*
  24. 23 kubectl apply -f calico.yaml
  25. 24 history
  26. 25 sudo systemctl status containerd
  27. 26 free -m
  28. 27 history
  29. 28 kubectl get all
  30. 29 source <(kubectl completion bash)
  31. 30 kubectl create deploy myfirstapp --image=nginx --replicas=3
  32. 31 kubectl get all
  33. 32 history
  34. 33 kubectl get all
  35. 34 kubectl delete pod myfirstapp-ff8c4b4d4-fkg4h
  36. 35 kubectl get all
  37. 36 history
  38. 37 kubectl run lonelypod --image=nginx
  39. 38 kubectl get all
  40. 39 kubectl delete pod lonelypod
  41. 40 kubectl get all
  42. 41 history
  43. 42 sudo systemctl status containerd
  44. 43 sudo systemctl status kubelet
  45. 44 kubectl get pods -n kube-system
  46. 45 kubectl get all
  47. 46 kubectl config view
  48. 47 kubectl get nodes
  49. 48 kubectl edit nodes control
  50. 49 kubectl get all
  51. 50 history | grep create depl
  52. 51 history | grep 'create depl'
  53. 52 kubectl api-resources | less
  54. 53 kubectl explain pod.spec
  55. 54 kubectl explain pod.spec | less
  56. 55 history
  57. 56 kubectl run mynginx --image=nginx --dry-run=client -o yaml
  58. 57 kubectl run mynginx --image=nginx --dry-run=client -o yaml > mynginx.yaml
  59. 58 kubectl explain pods.spec
  60. 59 kubectl explain pods.spec.volumes
  61. 60 kubectl apply -f mynginx.yaml
  62. 61 kubectl create -f mynginx.yaml
  63. 62 kubectl get pods
  64. 63 kubectl delete -f mynginx.yaml
  65. 64 ./countdown 13
  66. 65 vim multicontainer.yaml
  67. 66 kubectl apply -f multicontainer.yaml
  68. 67 kubectl get pods
  69. 68 vim initcontainer.yaml
  70. 69 kubectl create -f initcontainer.yaml
  71. 70 kubectl get pods
  72. 71 kubectl get ns
  73. 72 kubectl get pods
  74. 73 kubectl get pods -n kube-system
  75. 74 kubectl create ns myns
  76. 75 kubectl get ns
  77. 76 kubectl run mypod --image=nginx -n myns
  78. 77 kubectl get pods
  79. 78 kubectl get pods -n myns
  80. 79 kubectl get pods -A
  81. 80 history
  82. 81 kubectl config set-context --current namespace=myns
  83. 82 kubectl config set-context --current --namespace=myns
  84. 83 kubectl get pods
  85. 84 kubectl config set-context --current --namespace=default
  86. 85 kubectl get pdos
  87. 86 kubectl get pods
  88. 87 kubectl config view
  89. 88 history
  90. 89 kubectl run mydb --image=mariadb
  91. 90 kubectl get pods
  92. 91 kubectl describe pods mydb
  93. 92 kubectl get pods
  94. 93 kubectl describe pod mydb | less
  95. 94 history
  96. 95 kubectl logs mydb
  97. 96 kubectl delete pod mydb
  98. 97 kubectl run -h | less
  99. 98 kubectl run dbsdb --image=mariadb --env MARIADB_ROOT_PASSWORD=password
  100. 99 kubectl get pods
  101. 100 ls
  102. 101 cd ..
  103. 102 cd kube3weeks/
  104. 103 git pull
  105. 104 vim frontend-resources.yaml
  106. 105 kubectl apply -f frontend-resources.yaml
  107. 106 kubectl get pods
  108. 107 kubectl describe pod frontend
  109. 108 vim frontend-resources.yaml
  110. 109 kubectl delete pod frontend
  111. 110 kubectl apply -f frontend-resources.yaml
  112. 111 kubectl get pods
  113. 112 kubectl describe pod frontend
  114. 113 kubectl delete pod frontend
  115. 114 kubectl run busy --image=busybox
  116. 115 kubectl get pods
  117. 116 kubectl describe pod busy | less
  118. 117 kubectl logs busy
  119. 118 history
  120. 119 kubectl get pods -o wide
  121. 120 history
  122.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement