Connect from Kubernetes
Last updated
Was this helpful?
Was this helpful?
# pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: connectivity-test
labels:
role: connectivity-test
spec:
containers:
- name: connectivity-test
image: mysql
stdin: true
tty: true
command:
- "/bin/bash"kubectl attach -it connectivity-test
mysql -u <USERNAME> -p -h <DNS_NAME> --execute \"SHOW DATABASES;\"