Created
June 11, 2022 22:22
-
-
Save ZeroDeth/6d622aad78f3b91127ababb8cfc40c46 to your computer and use it in GitHub Desktop.
spin up a pod and connect from the pod itself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: mysql-rds-connection-test | |
namespace: default | |
spec: | |
containers: | |
- name: mysqlconn | |
image: mysql:latest | |
command: ['mysql'] | |
args: ['-c', 'show databases;'] | |
env: | |
- name: MYSQL_HOST | |
valueFrom: | |
secretKeyRef: | |
name: production-rds-conn-string | |
key: endpoint | |
- name: MYSQL_PWD | |
valueFrom: | |
secretKeyRef: | |
name: production-rds-conn-string | |
key: password | |
- name: USER | |
valueFrom: | |
secretKeyRef: | |
name: production-rds-conn-string | |
key: username | |
- name: MYSQL_TCP_PORT | |
valueFrom: | |
secretKeyRef: | |
name: production-rds-conn-string | |
key: port |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment