Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OPENSHIFT COMMANDS
- 1000 crc start -m 12288 -p ../pull-secret
- 1001 history | grep oc login
- 1002 history | grep 'oc login'
- 1003 oc login -u kubeadmin -p jcjAC-MpSHT-MSPge-tHVKS https://api.crc.testing:6443
- 1004 history | grep crc
- 1005 crc oc-env
- 1006 eval $(crc oc-env)
- 1007 oc login -u kubeadmin -p jcjAC-MpSHT-MSPge-tHVKS https://api.crc.testing:6443
- 1008 oc get ns | less
- 1009 oc api-resources | less
- 1010 ex180/countdown 12
- 1011 oc get is -n openshift
- 1012 oc new-app -h | less
- 1013 oc new-app php~https://github.com/sandervanvugt/simpleapp --name=simple-app
- 1014 oc get all
- 1015 oc new-project
- 1016 oc new-project friday
- 1017 oc get all
- 1018 oc new-app php~https://github.com/sandervanvugt/simpleapp --name=simple-app
- 1019 oc get all
- 1020 oc expose service simple-app
- 1021 oc get all
- 1022 curl simple-app-friday.apps-crc.testing
- 1023 oc get all
- 1024 history | grep build
- 1025 oc start-build simple-app-1
- 1026 oc get all
- 1027 oc start-build simple-app
- 1028 oc get all
- 1029 curl simple-app-friday.apps-crc.testing
- 1030 history
- KUBERNETES COMMANDS
- student@student-virtual-machine:~$ history
- 1 df -h
- 2 free -m
- 3 lscpu | less
- 4 sudo apt install git
- 5 git clone https://github.com/sandervanvugt/devopsinfourweeks
- 6 cd devopsinfourweeks/
- 7 ls
- 8 ./minikube-docker-setup.sh
- 9 ssh sander@192.168.52.136
- 10 minikube start --help
- 11 minikube start --vm-driver=docker --memory=6g
- 12 minikube status
- 13 kubectl get all
- 14 sudo apt install vim
- 15 ./counter.sh 15
- 16 kubectl api-resources
- 17 kubectl api-resources | wc
- 18 kubectl --help | less
- 19 kubectl completion --help | less
- 20 source <(kubectl completion bash)
- 21 kubectl create deployment -h | less
- 22 kubectl create deployment my-dep --image=nginx --replicas=3
- 23 kubectl get all
- 24 kubectl api-resources | less
- 25 kubectl delete pod my-dep-84885b44-2tnbt
- 26 kubectl get all
- 27 kubectl get pods
- 28 kubectl get pods
- 29 kubectl get pods -A
- 30 minikube dashboard &
- 31 kubectl get pods -A
- 32 kubectl create mytrouble --image=mariadb --replicas=3
- 33 kubectl create deploy mytrouble --image=mariadb --replicas=3
- 34 kubectl get all
- 35 kubectl describe pod mytrouble-7cd9cf99f7-8hmd9 | less
- 36 kubectl logs mytrouble-7cd9cf99f7-8hmd9
- 37 kubectl get pods
- 38 kubectl exec -it my-dep-84885b44-8hfll -- sh
- 39 ./counter.sh 15
- 40 kubectl create -h | less
- 41 kubectl create deploy -h | less
- 42 kubectl create deployment myother --image=busybox
- 43 kubectl get all
- 44 kubectl describe pod myother-5758f49dc4-dvg6j
- 45 kubectl get all
- 46 kubectl delete deployments.apps myother
- 47 kubectl create deployment myother --image=busybox sleep infinity
- 48 kubectl create deploy -h | less
- 49 kubectl create deployment myother --image=busybox -- sleep infinity
- 50 kubectl get all
- 51 kubectl delete deployments.apps mytrouble
- 52 kubectl create deploy mynginx --image=nginx --replicas=3 --dry-run=client -o yaml
- 53 kubectl create deploy mynginx --image=nginx --replicas=3 --dry-run=client -o json
- 54 kubectl create deploy mynginx --image=nginx --replicas=3 --dry-run=client -o yaml > mynginx.yaml
- 55 vim mynginx.yaml
- 56 kubectl explain deploy
- 57 kubectl explain deploy.spec
- 58 kubectl explain deploy.spec | less
- 59 kubectl explain deploy.spec.template.spec | less
- 60 kubectl edit deployments.apps my-dep
- 61 kubectl get deploy --selector app=my-dep
- 62 kubectl get all --selector app=my-dep
- 63 kubectl edit deployments.apps my-dep
- 64 kubectl get all --selector app=my-dep
- 65 kubectl edit deployments.apps my-dep
- 66 kubectl get all --selector app=my-dep
- 67 kubectl get pods -o wide
- 68 kubectl get deployments.apps
- 69 kubectl delete deploy myother
- 70 kubectl delete deploy my-dep
- 71 kubectl get all
- 72 kubectl create deployment mynginx --image=nginx --replicas=3
- 73 kubectl get all
- 74 kubectl get pods -o wide
- 75 curl 172.17.0.4
- 76 kubectl expose deployment mynginx --port=80
- 77 kubectl get svc
- 78 curl 10.99.255.223
- 79 minikube ssh
- 80 kubectl edit svc mynginx
- 81 kubectl get svc
- 82 curl $(minikube ip):31516
- 83 ./counter.sh 13
- 84 vim pv-pvc-pod.yaml
- 85 kubectl explain persistentvolume.spec
- 86 kubectl explain persistentvolume.spec | less
- 87 kubectl explain pod.spec.volumes | less
- 88 vim pv-pvc-pod.yaml
- 89 kubectl create -f pv-pvc-pod.yaml
- 90 vim pv-pvc-pod.yaml
- 91 kubectl create -f pv-pvc-pod.yaml
- 92 kubectl get pv,pvc
- 93 kubectl get storageclass
- 94 kubectl describe pod local-pv-pod
- 95 kubectl exec local-pv-pod -- touch /usr/share/nginx/html/friday
- 96 kubectl describe pv pvc-abc43582-9814-48a4-b77a-c105c96be7d1
- 97 minikube ssh
- 98 kubectl run mymysql --image=mysql:latest
- 99 kubectl get pods
- 100 kubectl describe pod mymysql
- 101 kubectl logs mymysql
- 102 kubectl delete pod mymysql
- 103 kubectl run mymysql --image=mysql:latest --env=MYSQL_ROOT_PASSWORD=password
- 104 kubectl get pods
- 105 sudo poweroff
- 106 history
- 107 minikube start --vm-driver=docker --memory=6g
- 108 kubectl get all
- 109 history
- 110 kubectl create cm myvars --from-literal=VAR1=goat --from-literal=VAR=cow
- 111 kubectl describe cm myvars
- 112 cd devopsinfourweeks/
- 113 vim cm-test-pod.yaml
- 114 kubectl create -f cm-test-pod.yaml
- 115 kubectl logs test1
- 116 kubectl create cm nginxconf --from-file nginx-custom-config.conf
- 117 kubectl describe cm nginxconf
- 118 vim nginx-cm.yml
- 119 kubectl create -f nginx-cm.yml
- 120 source <(kubectl completion bash)
- 121 kubectl get pods
- 122 kubectl describe pod nginx-cm
- 123 kubectl get cm
- 124 kubectl delete -f nginx-cm.yml
- 125 vim nginx-cm.yml
- 126 kubectl create -f nginx-cm.yml
- 127 kubectl get pods
- 128 kubectl delete pods test1
- 129 kubectl exec -it nginx-cm -- /bin/bash
- 130 kubectl exec -it nginx-cm -- cat /etc/nginx/conf.d/default.conf
- 131 cat nginx-custom-config.conf
- 132 kubectl run --help | less
- 133 kubectl create deploy -h | less
- 134 kubectl set env -h | less
- 135 kubectl create deploy blue-nginx --image=nginx:1.14 --replicas=3
- 136 kubectl get all --selector app=blue-nginx
- 137 kubectl expose deploy blue-nginx --port=80 --name=bgnginx
- 138 kubectl get all --selector app=blue-nginx
- 139 minikube ip
- 140 minikube ssh
- 141 kubectl get deployments.apps blue-nginx -o yaml > green-nginx.yaml
- 142 vim green-nginx.yaml
- 143 kubectl create -f green-nginx.yaml
- 144 kubectl get pods
- 145 kubectl get svc
- 146 oc get endpoints
- 147 kubectl get endpoints
- 148 kubectl delete svc bgnginx; kubectl expose deployment green-nginx --port=80 --name=bgnginx
- 149 kubectl get endpoints
- 150 oc get deploy
- 151 kubectl get deploy
- 152 kubectl scale deployment blue-nginx --replicas=0
- 153 kubectl get deploy
- 154 ./counter.sh 1
- 155 kubectl get deploy
- 156 kubectl delete deploy blue-nginx
- 157 kubectl delete deploy mynginx
- 158 kubectl delete deploy gree-nmynginx
- 159 kubectl delete deploy green-mynginx
- 160 kubectl delete deploy green-nginx
- 161 kubectl get svc
- 162 kubectl delete svc mynginx
- 163 kubectl delete svc bgnginx
- 164 kubectl create deploy old-nginx --image=nginx:1.14 --replicas=3 --dry-run=client -o yaml > ~/oldnginx.yaml
- 165 cd
- 166 vim oldnginx.yaml
- 167 kubectl create -f oldnginx.yaml
- 168 kubectl get all --show-labels
- 169 kubectl expose deploy old-nginx --name=oldnginx --port=80 --selector type=canary
- 170 kubectl get svc
- 171 kubectl edit svc oldnginx
- 172 kubectl get svc
- 173 kubectl get endpoints
- 174 curl 192.168.49.2:31038
- 175 kubectl cp old-nginx-66bd7bb796-g7ss8:/usr/share/nginx/html/index.html index.html
- 176 vim index.html
- 177 kubectl create cm canary --from-file=index.html
- 178 kubectl describe cm canary
- 179 cp oldnginx.yaml canary.yaml
- 180 cd devopsinfourweeks/
- 181 vim canary.yaml
- 182 kubectl get endpoints
- 183 kubectl create -f canary.yaml
- 184 kubectl get endpoints
- 185 kubectl get svc
- 186 curl 192.168.49.2:31038
- 187 kubectl get deploy
- 188 kubectl scale deployment new-nginx --replicas=3
- 189 kubectl get deploy
- 190 kubectl scale deployment old-nginx --replicas=0
- 191 kubectl get deploy
- 192 kubectl delete deployments.apps old-nginx
- 193 ./counter.sh 1
- 194 cd ../Downloads/
- 195 ls
- 196 tar xvf helm-v3.9.0-linux-amd64.tar.gz
- 197 sudo mv linux-amd64/helm /usr/local/bin/
- 198 helm version
- 199 helm repo add bitnami https://charts.bitnami.com/bitnami
- 200 helm repo list
- 201 helm search repo bitnami
- 202 helm repo update
- 203 helm install bitnami/mysql --generate-name
- 204 kubectl get all
- 205 helm show chart bitnami/mysql
- 206 helm show all bitnami/mysql
- 207 helm list
- 208 helm status mysql-1656076179
- 209 history
- 210 helm show values bitnami/nginx
- 211 helm pull bitnami/nginx
- 212 ls
- 213 tar xvf nginx-12.0.5.tgz
- 214 vim nginx/values.yaml
- 215 helm template --debug nginx
- 216 helm install -f nginx/values.yaml my-nginx nginx/
- 217 kubectl api-resources
- 218 kubectl api-resources | less
- 219 cd ../devopsinfourweeks/
- 220 ls
- 221 git pull
- 222 vim crd-object.yaml
- 223 kubectl create -f crd-object.yaml
- 224 kubectl api-resources | grep backup
- 225 vim crd-backup.yaml
- 226 kubectl create -f crd-backup.yaml
- 227 kubectl get backups.stable.example.com
- 228 minikube stop
- 229 minikube delete
- 230 minikube start --network-plugin=cni --extra-config=kubeadm.pod-network-cidr=10.10.0.0/16
- 231 kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml
- 232 kubectl get all -n tigera-operator
- 233 kubectl get pods -n tigera-operator tigera-operator-7d8c9d4f67-ds8g2 -o yaml | less
- 234 wget https://docs.projectcalico.org/manifests/custom-resources.yaml
- 235 vim custom-resources.yaml
- 236 kubectl create -f custom-resources.yaml
- 237 kubectl get installations.operator.tigera.io
- 238 kubectl get pods -n calico-system
- 239 ./counter.sh 1
- 240 minikube addons list
- 241 kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
- 242 kubectl api-resources | grep -i tekton
- 243 kubectl get ns
- 244 kubectl get pods -n tekton-pipelines
- 245 cat hello-world.yaml
- 246 kubectl apply -f hello-world.yaml
- 247 cat hello-world-run.yaml
- 248 kubectl apply -f hello-world-run.yaml
- 249 kubectl get taskruns.tekton.dev
- 250 kubectl logs --selector=tekton.dev/taskRun=hello-task-run
- 251 kubectl get taskruns.tekton.dev
- 252 kubectl get all -n tekton-pipelines
- 253 kubectl get all
- 254 history
- 255 cat goodbye-world.yaml
- 256 kubectl apply -f goodbye-world.yaml
- 257 cat hello-goodbye-pipeline.yaml
- 258 kubectl explain Pipeline.spec
- 259 kubectl apply -f hello-goodbye-pipeline.yaml
- 260 cat hello-goodbye-pipeline-run.yaml
- 261 kubectl apply -f hello-goodbye-pipeline-run.yaml
- 262 kubectl get pods
- 263 tkn pipelinerun logs hello-goodbye-run -f -n default
- 264 ./counter.sh 1
- 265 kubectl create ns argocd
- 266 kubectl get ns
- 267 kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
- 268 kubectl get all -n argocd
- 269 cd ../Downloads/
- 270 ls
- 271 file argocd-linux-amd64
- 272 sudo mv argocd-linux-amd64 /usr/local/bin/argocd
- 273 kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
- 274 kubectl port-forward svc/argocd-server -n argocd 8080:443
- 275 bg
- 276 argocd login localhost:8080
- 277 sudo chmod +x /usr/local/bin/argocd
- 278 argocd login localhost:8080
- 279 argocd account update-password
- 280 argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-server https://kubernetes.default.svc --dest-namespace default
- 281 argocd app get guestbook
- 282 kubectl get all
- 283 argocd app list
- 284 argocd app sync guestbook
- 285 kubectl get all
- 286 exit
- 287 ls
- 288 cd devopsinfourweeks/
- 289 ./counter.sh 15
- 290 sudo apt update;sudo apt install -y gnupg
- 291 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3EFE0E0A2F2F60AA
- 292 echo "deb http://ppa.launchpad.net/tektoncd/cli/ubuntu eoan main"|sudo tee /etc/apt/sources.list.d/tektoncd-ubuntu-cli.list
- 293 sudo apt update && sudo apt install -y tektoncd-cli
- 294 exit
- 295 history
Add Comment
Please, Sign In to add comment