Difference between revisions of "Kubernetes Training Excercises"
Jump to navigation
Jump to search
Line 33: | Line 33: | ||
``` | ``` | ||
k -it exec pod/mysql-server-sxmct -n zabbix -- bash | 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