Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zaharidichev/fed5a5d9d7338fc960de478dd90e93ff to your computer and use it in GitHub Desktop.
Save zaharidichev/fed5a5d9d7338fc960de478dd90e93ff to your computer and use it in GitHub Desktop.
mysql
apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: memtest
spec:
ports:
- port: 15800
selector:
app: mysql
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
namespace: memtest
spec:
selector:
matchLabels:
app: mysql
strategy:
type: Recreate
template:
metadata:
labels:
app: mysql
spec:
containers:
- image: launcher.gcr.io/google/mysql5
name: mysql
env:
# Use secret in real usage
- name: MYSQL_ROOT_PASSWORD
value: password
volumeMounts:
- name: config
mountPath: /etc/mysql/conf.d
ports:
- containerPort: 15800
name: mysql
volumes:
- name: config
configMap:
name: config
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql-client
namespace: memtest
spec:
selector:
matchLabels:
app: mysql-client
strategy:
type: Recreate
template:
metadata:
labels:
app: mysql-client
spec:
containers:
- image: launcher.gcr.io/google/mysql5
name: mysql-client
env:
# Use secret in real usage
- name: MYSQL_ROOT_PASSWORD
value: password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment