apiVersion: v1
kind: Pod
metadata:
  name: pod-secret-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
      env:
        - name: MYSQL_ROOT_PASSWORD
          valueFrom:
            secretKeyRef:
              key: password
              name: mysql-credentials
