Created
December 1, 2017 15:55
-
-
Save DeadWisdom/a895e2a7d82adaeebe89eec753bb269a to your computer and use it in GitHub Desktop.
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
kind: PersistentVolume | |
apiVersion: v1 | |
metadata: | |
name: loft-pv | |
labels: | |
type: amazonEBS | |
spec: | |
capacity: | |
storage: 40Gi | |
accessModes: | |
- ReadWriteOnce | |
awsElasticBlockStore: | |
volumeID: ****** | |
fsType: ext4 | |
--- | |
kind: PersistentVolumeClaim | |
apiVersion: v1 | |
metadata: | |
name: mysql-pvc | |
labels: | |
type: amazonEBS | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 40Gi | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mysql | |
spec: | |
ports: | |
- port: 3306 | |
protocol: TCP | |
targetPort: 3306 | |
selector: | |
app: mysql | |
--- | |
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: mysql | |
spec: | |
replicas: 1 | |
selector: | |
app: mysql | |
template: | |
metadata: | |
name: mysql | |
labels: | |
app: mysql | |
spec: | |
containers: | |
- name: mariadb | |
image: mariadb | |
volumeMounts: | |
- name: mysql-storage | |
mountPath: /var/lib/mysql | |
env: | |
- name: MYSQL_ROOT_PASSWORD | |
value: ******* | |
ports: | |
- containerPort: 3306 | |
volumes: | |
- name: mysql-storage | |
persistentVolumeClaim: | |
claimName: mysql-pvc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment