Difference between revisions of "Kubernetes Training Excercises"
Jump to navigation
Jump to search
(Created page with "busk-ubuntu.yml ``` apiVersion: v1 kind: Pod metadata: name: busk-ubuntu labels: app: busk-ubuntu spec: containers: - name: ubuntu image: ubuntu:latest com...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
kubectl apply -f busk-ubuntu.yml | kubectl apply -f busk-ubuntu.yml | ||
kubectl exec --stdin --tty busk-ubuntu -- /bin/bash | kubectl exec --stdin --tty busk-ubuntu -- /bin/bash | ||
+ | apt update | ||
+ | apt install -y iproute2 iputils-ping | ||
``` | ``` | ||
Try setting 365d to 5m do something and then see it get wiped | Try setting 365d to 5m do something and then see it get wiped | ||
+ | |||
+ | |||
+ | Install some other tools | ||
+ | ``` | ||
+ | apt install postgresql-client | ||
+ | ``` | ||
+ | |||
+ | Connect other ways | ||
+ | ``` | ||
+ | k -it exec pod/mysql-server-sxmct -n zabbix -- bash | ||
+ | k logs pod/mysql-server-sxmct -n zabbix | ||
+ | k get pod -o wide | ||
+ | ``` |
Latest revision as of 21:34, 14 May 2021
busk-ubuntu.yml
apiVersion: v1 kind: Pod metadata: name: busk-ubuntu labels: app: busk-ubuntu spec: containers: - name: ubuntu image: ubuntu:latest command: ["/bin/sleep", "365d"] imagePullPolicy: IfNotPresent restartPolicy: Always
kubectl apply -f busk-ubuntu.yml kubectl exec --stdin --tty busk-ubuntu -- /bin/bash apt update apt install -y iproute2 iputils-ping
Try setting 365d to 5m do something and then see it get wiped
Install some other tools
apt install postgresql-client
Connect other ways
k -it exec pod/mysql-server-sxmct -n zabbix -- bash k logs pod/mysql-server-sxmct -n zabbix k get pod -o wide