Advertisement
sandervanvugt

kube3weeks june23 day1

Jun 2nd, 2023
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. student@control:~/kube3weeks$ history
  2. 1 git clone https://github.com/sandervanvugt/cka
  3. 2 cd cka
  4. 3 ls
  5. 4 ls *sh
  6. 5 sudo setup-container.sh
  7. 6 sudo ./setup-container.sh
  8. 7 ls *sh
  9. 8 sudo ./setup-kubetools.sh
  10. 9 history
  11. 10 sudo kubeadm init
  12. 11 history
  13. 12 mkdir -p $HOME/.kube
  14. 13 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  15. 14 sudo chown $(id -u):$(id -g) $HOME/.kube/config
  16. 15 kubectl get all
  17. 16 kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/tigera-operator.yaml
  18. 17 kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/custom-resources.yaml
  19. 18 kubectl get pods -n calico-system
  20. 19 history
  21. 20 kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.25.0/manifests/calico.yaml
  22. 21 kubectl get pods -n calico-system
  23. 22 kubectl get ns
  24. 23 kubectl get pods -n kube-system
  25. 24 history
  26. 25 kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/calico.yaml
  27. 26 history
  28. 27 cd
  29. 28 git clone https://github.com/sandervanvugt/kube3weeks
  30. 29 cd kube3weeks/
  31. 30 ls -l *sh
  32. 31 chmod +x setup-calico.sh
  33. 32 history
  34. 33 kubectl get pods -n calico-system
  35. 34 kubectl get pods -n kube-system
  36. 35 kubectl get nodes
  37. 36 kubectl run testapp --image=nginx
  38. 37 history
  39. 38 git pull
  40. 39 less setup-kubecluster-history.txt
  41. 40 git pull
  42. 41 less setup-kubecluster-history.txt
  43. 42 cd
  44. 43 source <(kubectl completion bash)
  45. 44 kubectl completion -h | less
  46. 45 kubectl create deployment myfirstapp --image=nginx --replicas=3
  47. 46 kubectl get all
  48. 47 kubectl delete pods myfirstapp-564cb9865d-czm74
  49. 48 kubectl get all
  50. 49 kubectl run lonelypod --image=nginx
  51. 50 kubectl get all
  52. 51 kubectl get pods
  53. 52 kubectl delete pod lonelypod
  54. 53 kubectl get all
  55. 54 history
  56. 55 kubectl api-resources | less
  57. 56 kubectl explain pods
  58. 57 kubectl explain pod.spec | less
  59. 58 cd kube3weeks/
  60. 59 ls
  61. 60 kubectl get pods
  62. 61 kubectl get pods testapp -o yaml | less
  63. 62 history
  64. 63 kubectl explain nodes.spec | less
  65. 64 history | grep yaml
  66. 65 wget https://raw.githubusercontent.com/projectcalico/calico/v3.26.0/manifests/calico.yaml
  67. 66 vim calico.yaml
  68. 67 kubectl run mynginx --image=nginx --dry-run=client -o yaml
  69. 68 kubectl run mynginx --image=nginx --dry-run=client -o yaml > mynginx.yaml
  70. 69 vim mynginx.yaml
  71. 70 kubectl explain pod.spec
  72. 71 vim mynginx.yaml
  73. 72 kubectl apply -f mynginx.yaml
  74. 73 vim mynginx.yaml
  75. 74 kubectl apply -f mynginx.yaml
  76. 75 kubectl get pods
  77. 76 vim mynginx.yaml
  78. 77 kubectl apply -f mynginx.yaml
  79. 78 kubectl delete -f mynginx.yaml
  80. 79 kubectl apply -f mynginx.yaml
  81. 80 history
  82. 81 kubectl delete -f mynginx.yaml
  83. 82 vim multicontainer.yaml
  84. 83 kubectl create -f multicontainer.yaml
  85. 84 kubectl get pods
  86. 85 kubectl explain pod.spec | less
  87. 86 history
  88. 87 vim mynginx.yaml
  89. 88 kubectl create deploy yamltest --image=nginx --replicas=3 --dry-run=client -o yaml
  90. 89 vim initstuff.yaml
  91. 90 kubectl apply -f initstuff.yaml
  92. 91 kubectl get pods
  93. 92 vim initstuff.yaml
  94. 93 kubectl apply -f initstuff.yaml
  95. 94 vim initstuff.yaml
  96. 95 kubectl apply -f initstuff.yaml
  97. 96 kubectl get pods
  98. 97 kubectl get ns
  99. 98 kubectl get pods
  100. 99 kubectl get pods -n kube-system
  101. 100 kubectl get pods -n tigera-operator
  102. 101 kubectl get pods -A
  103. 102 kubectl get all -A
  104. 103 kubectl get pods -n kube-system
  105. 104 kubectl create ns secret
  106. 105 kubectl run secretapp --image=nginx -n secret
  107. 106 kubectl get pods
  108. 107 kubectl get pods -n secret
  109. 108 kubectl config set-context --current --namespace=secret
  110. 109 kubectl get pods
  111. 110 kubectl config view
  112. 111 kubectl config set-context --current --namespace=default
  113. 112 kubectl run mydb --image=mariadb
  114. 113 kubectl get pods
  115. 114 kubectl describe pod mydb | less
  116. 115 kubectl logs mydb
  117. 116 kubectl delete pod mydb
  118. 117 kubectl run mydb --image=mariadb -e MARIADB_ROOT_PASSWORD=password
  119. 118 kubectl run mydb --image=mariadb --env MARIADB_ROOT_PASSWORD=password
  120. 119 kubectl run -h | less
  121. 120 kubectl options
  122. 121 kubectl options | wc
  123. 122 kubectl get pods
  124. 123 kubectl run mydb --image=mariadb --env MARIADB_ROOT_PASSWORD=password --dry-run=client -o yaml > mydb.yaml
  125. 124 vim mydb.yaml
  126. 125 history
  127.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement