apiVersion: v1
kind: Pod
metadata:
  name: pod-secret-volumes-demo
  namespace: default
  labels:
    app: myapp
    tier: frontend
  annotations:
    crazy-chinese.com/created-by: "cluster-admin"
spec:
  containers:
    - name: mypp
      image: ikubernetes/myapp:v1
      imagePullPolicy: IfNotPresent
      ports:
      - name: http
        containerPort: 80
      volumeMounts:
        - mountPath: /home/credentials
          name: secret-mysql-credentials
          readOnly: true
  volumes:
    - name: secret-mysql-credentials
      secret:
        secretName: mysql-credentials
        defaultMode: 0600