Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- student@student-virtual-machine:~/gitops$ history
- 1 cd gitops/
- 2 ./countdown 12
- 3 sudo apt install openssh-server
- 4 ip a
- 5 ls
- 6 cd mondayinjuly/
- 7 ls
- 8 gh auth login
- 9 git status
- 10 git push
- 11 cd ..
- 12 vim bestoken.txt
- 13 free -m
- 14 lscpu
- 15 df -h
- 16 sudo apt install git vim -y
- 17 git clone https://github.com/sandervanvugt/gitops
- 18 history
- 19 cd gitops/
- 20 ls
- 21 git
- 22 git config --global user.email "mail@sandervanvugt.nl"
- 23 git config --global user.name "sandervanvugt"
- 24 git config --global init.defaultBranch main
- 25 cd
- 26 mkdir mondayinjuly
- 27 cd mondayinjuly/
- 28 ls -a
- 29 git init
- 30 ls -a
- 31 vim README.md
- 32 git status
- 33 git add *
- 34 git status
- 35 git commit -m "initial commit"
- 36 git status
- 37 git branch -M main
- 38 git remote add origin https://github.com/sandervanvugt/mondayinjuly
- 39 git push -u origin main
- 40 vim mytoken.txt
- 41 cat mytoken.txt
- 42 vim mytoken.txt
- 43 type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
- 44 curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null && sudo apt update && sudo apt install gh -y
- 45 gh
- 46 gh auth login
- 47 git push -u origin main
- 48 history
- 49 git status
- 50 git branch newfiles
- 51 git status
- 52 git switch newfiles
- 53 echo three > three.txt
- 54 git add *
- 55 git commit -m three
- 56 git push --set-upstream origin newfiles
- 57 git switch main
- 58 git status
- 59 ls
- 60 git merge newfiles
- 61 ls
- 62 git rm mytoken.txt
- 63 git push
- 64 cd ../gitops/
- 65 ./countdown 13
- 66 ls
- 67 docker
- 68 ./minikube-docker-setup.sh
- 69 docker
- 70 docker search mariadb
- 71 docker pull mariadb
- 72 docker images
- 73 docker inspect mariadb
- 74 docker inspect mariadb | less
- 75 docker image history mariadb | less
- 76 docker image rm mariadb
- 77 cd dockerfiledemo/
- 78 ls
- 79 cat README.txt
- 80 cat Dockerfile
- 81 docker build -t docker.io/sandervanvugt/mynmaptest:1.0
- 82 docker build -t . docker.io/sandervanvugt/mynmaptest:1.0
- 83 docker build . -t docker.io/sandervanvugt/mynmaptest:1.0
- 84 vim Dockerfile
- 85 docker run sandervanvugt/mynmaptest
- 86 docker run sandervanvugt/mynmaptest:1.0
- 87 docker run sandervanvugt/mynmaptest:1.0 sh
- 88 vim Dockerfile
- 89 docker build . -t docker.io/sandervanvugt/mynmaptest:2.0
- 90 docker run sandervanvugt/mynmaptest:2.0 sh
- 91 docker run -it sandervanvugt/mynmaptest:2.0 sh
- 92 cd ../gitopstools/
- 93 ls
- 94 vim Dockerfile
- 95 docker build . -t gitopsnew
- 96 docker images
- 97 docker login
- 98 docker tag gitopsnew sandervanvugt/gitopsnew
- 99 docker push sandervanvugt/gitopsnew
- 100 cd ..
- 101 mkdir gitopsjuly
- 102 cd gitops
- 103 cd gitopsjuly/
- 104 cat > Dockerfile <<EOF
- 105 FROM busybox
- 106 CMD echo "hello world"
- 107 EOF
- 108 git init
- 109 git add *
- 110 git commit -m "first commit"
- 111 git branch -M main
- 112 git remote add origin
- 113 git remote add origin https://github.com/sandervanvugt/gitopsjuly
- 114 git push -u origin main
- 115 ../countdown 12
- 116 ls
- 117 vim Dockerfile
- 118 git add *
- 119 git commit -m update
- 120 git push -o origin main
- 121 git push
- 122 cd ..
- 123 ls
- 124 mini
- 125 minikube status
- 126 tail -2 minikube-docker-setup.sh
- 127 tail minikube-docker-setup.sh
- 128 minikube start --memory=6g --cpus=4 --vm-driver=docker
- 129 minikube status
- 130 kubectl get all
- 131 source <(kubectl completion bash)
- 132 kubectl create deployment --image nginx --replicas=3
- 133 kubectl create deployment first --image nginx --replicas=3
- 134 kubectl get all
- 135 history
- 136 kubectl api-resources | less
- 137 history
- 138 kubectl create deploy myapp --image=nginx --replicas=3 --dry-run=client -o yaml
- 139 kubectl create deploy myapp --image=nginx --replicas=3 --dry-run=client -o yaml > myapp.yaml
- 140 kubectl create deploy myserver --image=nginx
- 141 kubectl delete deployments.apps myserver
- 142 kubectl create deploy myserver --image=nginx --dry-run=client -o yaml > myserver.yaml
- 143 vim myserver.yaml
- 144 kubectl apply -f myserver.yaml
- 145 kubectl create deploy webserver --image=nginx --replicas=3 --dry-run=client -o yaml > webserver.yaml
- 146 cat webserver.yaml
- 147 kubectl apply -f webserver.yaml
- 148 kubectl get all
- 149 kubectl describe pod webserver-696774f554-rn94p
- 150 kubectl describe pod webserver-696774f554-rn94p | less
- 151 kubectl describe deploy webserver
- 152 kubectl get deploy webserver -o yaml | less
- 153 vim webserver.yaml
- 154 kubectl get deploy webserver -o yaml | less
- 155 vim webserver.yaml
- 156 kubectl diff -f webserver.yaml
- 157 vim webserver.yaml
- 158 kubectl diff -f webserver.yaml
- 159 history
- 160 sudo poweroff
- 161 minikube start
- 162 history
- 163 ls
- 164 cd gitops/
- 165 vim webserver.yaml
- 166 kubectl get deploy
- 167 kubectl diff -f webserver.yaml
- 168 history
- 169 kubectl get deploy webserver -o yaml | less
- 170 vim webserver.yaml
- 171 kubectl diff -f webserver.yaml
- 172 kubectl apply -f webserver.yaml
- 173 kubectl diff -f webserver.yaml
- 174 kubectl apply -f webserver.yaml
- 175 ./countdown 1
- 176 kubectl port-forward -h | less
- 177 source <(kubectl completion bash)
- 178 kubectl port-forward webserver-696774f554-vw982 8080:80
- 179 bg
- 180 curl localhost:8080
- 181 fg
- 182 kubectl get ns
- 183 kubectl get pods
- 184 kubectl get pods -n kube-system
- 185 kubectl get deploy webserver -o yaml | less
- 186 kubectl create deploy annotated --image=nginx
- 187 kubectl annotate deployment annotated environment=qa
- 188 kubectl get deploy -A -o jsonpath='{.items[0].metadata.annotations}' | jq
- 189 sudo apt install jq
- 190 kubectl get deploy -A -o jsonpath='{.items[0].metadata.annotations}' | jq
- 191 kubectl get deploy -A -o jsonpath='{.items[1].metadata.annotations}' | jq
- 192 kubectl get deploy -A -o jsonpath='{.items[2].metadata.annotations}' | jq
- 193 kubectl get deploy -A -o jsonpath='{.items[?(@.metadata.annotations.environment="qa")].metadata.name
- }
- 194 kubectl get deploy -A -o jsonpath='{.items[?(@.metadata.annotations.environment="qa")].metadata.name
- }'
- 195 kubectl get deploy -A -o jsonpath='{.items[?(@.metadata.annotations.environment="qa")].metadata.name
- }
- 196 kubectl get deploy -A -o jsonpath='{.items[?(@.metadata.annotations.environment="qa")].metadata.name}'
- 197 kubectl get deploy -A -o jsonpath='{.items[?(@.metadata.annotations.environment=="qa")].metadata.name}'
- 198 kubectl get deploy -A -o jsonpath='{.items[?(@.metadata.annotations.kubectl\.kubernetes\.io/last-applied-configuration)].metadata.name}'
- 199 kubectl get deploy webserver -o yaml | less
- 200 kubectl create cm testcm --from-literal=time=late
- 201 kubectl describe cm testcm
- 202 kubectl set -h | less
- 203 kubectl set env -h | less
- 204 kubectl set env --from=cm/testcm deploy webserver
- 205 kubectl get deploy webserver -o yaml | less
- 206 kubectl exec -it webserver-6dc9c77c5-snh8f env
- 207 kubectl edit cm testcm
- 208 kubectl exec -it webserver-6dc9c77c5-snh8f -- env
- 209 kubectl delete pod webserver-6dc9c77c5-snh8f
- 210 kubectl get pods
- 211 kubectl exec -it webserver-6dc9c77c5-xx2mk -- env
- 212 ls
- 213 vim pv-pod.yaml
- 214 vim pvc.yaml
- 215 ./countdown 13
- 216 kubectl create deploy webapp --image=nginx --replicas=3
- 217 kubectl get all --selector app=webapp
- 218 kubect expose deploy webapp --port=80 --type=NodePort
- 219 kubectl expose deploy webapp --port=80 --type=NodePort
- 220 kubectl get all --selector app=webapp
- 221 kubectl get svc webapp -o yaml | less
- 222 kubectl describe svc webapp
- 223 kubectl get pods --selector app=webapp -o wide
- 224 curl 10.109.70.79
- 225 minikube ssh
- 226 curl 192.168.49.2:32182
- 227 minikube addons list
- 228 minikube addon list
- 229 minikube addons enable ingress
- 230 kubectl get ns
- 231 kubectl get pods,svc -n ingress-nginx
- 232 vim ingress-patch.yaml
- 233 history | grep git
- 234 kubectl patch -n ingress-nginx cm ingress-nginx-controller --patch-file ingress-patch.yaml
- 235 kubectl delete pod -n ingress-nginx ingress-nginx-controller-6cc5ccb977-sh4jz
- 236 kubectl get pods -n ingress-nginx
- 237 kubectl create deployment nginxsvc --image=nginx
- 238 kubectl expose deployment nginxsvc --port=80 --type=NodePort
- 239 kubectl get svc
- 240 curl $(minikube ip):30786
- 241 kubectl create ingress nginxsvc-ingress --rule="/=nginxsvc:80" --rule="/hello=newdep:8080"
- 242 sudo vim /etc/hosts
- 243 kubectl get ingress
- 244 kubectl describe ing nginxsvc-ingress
- 245 curl nginxsvc.info
- 246 curl nginxsvc.info/hello
- 247 kubectl create deployment newdep --image=gcr.io/google-samples/hello-app:2.0
- 248 kubectl expose deployment newdep --port=8080
- 249 kubectl get svc
- 250 curl nginxsvc.info/hello
- 251 history
- 252 ./countdown 1
- 253 kubectl api-resources | less
- 254 kubectl get deploy
- 255 kubectl delete deploy --all
- 256 kubectl delete svc --all
- 257 kubectl get svc
- 258 kubectl create ns preprod; kubectl create deploy preprod --image=nginx -n preprod
- 259 kubectl expose deploy preprod -n preprod --port=80
- 260 kubectl create svc externalname -h | less
- 261 kubectl create svc externalname preprod --external-name preprod.preprod.svc.cluster.local
- 262 kubectl get svc,deploy
- 263 kubectl get svc,deploy -n preprod
- 264 kubectl create ingress simple --rule="foo.com/=preprod:80"
- 265 sudo su -c "echo 192.168.49.2 foo.com >> /etc/hosts"
- 266 cat /etc/hosts
- 267 curl foo.com
- 268 kubectl describe svc preprod
- 269 history
- 270 kubectl get ing,svc
- 271 kubectl get svc -n preprod
- 272 kubectl describe ing simple
- 273 ./countdown 13
- 274 vim nwp.yaml
- 275 history | grep minikube start
- 276 history | grep 'minikube start'
- 277 kubectl create ns prod
- 278 kubectl run web --image=nginx -n prod
- 279 kubectl expose -n prod pod web --port=80
- 280 kubectl run prodpod --image=sandervanvugt/gitops -n prod -- sleep infinity
- 281 kubectl get all -n prod
- 282 kubectl run prodpod --image=docker.io/library/sandervanvugt/gitops -n prod -- sleep infinity
- 283 kubectl delete pod prodpod -n prod
- 284 kubectl run prodpod --image=docker.io/library/sandervanvugt/gitops -n prod -- sleep infinity
- 285 kubectl get all -n prod
- 286 kubectl delete pod prodpod -n prod
- 287 kubectl run prodpod --image=docker.io/sandervanvugt/gitops -n prod -- sleep infinity
- 288 kubectl get all -n prod
- 289 kubectl describe pods -n prod prodpod
- 290 docker login
- 291 kubectl describe pods -n prod prodpod
- 292 kubectl create secret -h | less
- 293 kubectl create secret docker-registry
- 294 kubectl create secret docker-registry sander -h
- 295 kubectl create secret docker-registry sander -h | less
- 296 ip a
- 297 kubectl create secret docker-registry sander -h | less
- 298 source ../secrets
- 299 echo $DUMMY
- 300 kubectl create secret docker-registry sander -h | less
- 301 kubectl create secret docker-registry my-secret --docker-server=hub.docker.io --docker-username=$DOCKER_USER --docker-password=$DOCKER_PASSWORD --docker-email=$DOCKER_EMAIL
- 302 kubectl explain --recursive pod.spec | less
- 303 kubectl delete pod -n prod prodpod
- 304 kubectl run prodpod --image=sandervanvugt/gitops -n prod --dry-run=client -o yaml -- sleep infinity > prodpod.yaml
- 305 vim prodpod.yaml
- 306 kubectl apply -f prodpod.yaml
- 307 kubectl explain pod.spec.containers | less
- 308 kubectl explain pod.spec | less
- 309 kubectl explain --recursive pod.spec | less
- 310 vim prodpod.yaml
- 311 kubectl apply -f prodpod.yaml
- 312 vim prodpod.yaml
- 313 kubectl apply -f prodpod.yaml
- 314 kubectl get pods -n prod
- 315 kubectl describe -n prod pod prodpod
- 316 kubectl create sa gitops
- 317 kubectl get clusterroles -A | less
- 318 kubectl create clusterrolebinding admin --clusterrole=admin --serviceaccount=default:gitops
- 319 kubectl get pods
- 320 kubectl run testpod --image=nginx
- 321 kubectl get pods -o yaml
- 322 kubectl get pods -n prod
- 323 history
- 324 kubectl get pods -n prod
- 325 kubectl exec -n prod prodpod -- curl web
- 326 kubectl run defaultpod --image=sandervanvugt/gitops -n default -- sleep infinity
- 327 kubectl get pods
- 328 kubectl exec -n default defaultpod -- curl web.prod.svc.cluster.local
- 329 kubectl get svc -n prod
- 330 kubectl describe svc web -n prod
- 331 kubectl apply -f nwp.yaml
- 332 kubectl exec -n default defaultpod -- curl 10.107.111.183
- 333 kubectl get networkpolicy -n prod
- 334 kubectl get networkpolicy -n prod -o yaml
- 335 minikube addons list
- 336 cd
- 337 git clone https://github.com/sandervanvugt/cka
- 338 cd cka
- 339 ls
- 340 kubectl create -f calico.yaml
- 341 kubectl get ns
- 342 kubectl get pods,svc -n kube-system
- 343 kubectl delete -f calico.yaml
- 344 vim calico.yaml
- 345 kubectl create -f calico.yaml
- 346 kubectl get pods -n kube-system
- 347 history
- 348 kubectl exec -n default defaultpod -- curl web.prod.svc.cluster.local
- 349 kubectl exec -n default defaultpod -- curl 10.107.111.183
- 350 kubectl get --watch --output-watch-events pod
- 351 cd ../gitops/
- 352 vim exposenginx.yaml
- 353 ls expos*
- 354 mv exposenginx.yaml exposenginx.sh
- 355 vim exposenginx.sh
- 356 chmod +x exposenginx.sh
- 357 ./exposenginx.sh
- 358 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement