Welcome to the Linux Foundation Forum!

Code snippet for Using Secrets via Environment Variables is wrong?

spec:
    containers:
    - image: mysql:5.5
      env:
      - name: MYSQL_ROOT_PASSWORD
        valueFrom:
            secretKeyRef:
                name: mysql
            key: password
            name: mysql

Whereas the example shows in official docs has quite different layout:

spec:
  containers:
  - name: mycontainer
    image: redis
    env:
      - name: SECRET_USERNAME
        valueFrom:
          secretKeyRef:
            name: mysecret
            key: username

Answers

Sign In or Register to comment.