Can't connect to mysql pod in Kubernetes when using Secrets for password (Access denied)

后端 未结 5 361
忘掉有多难
忘掉有多难 2021-01-13 11:03

I try to setup a mysql database in Kubernetes. I configured a ConfigMap to store the Database name and a Secret that contains the root password, the user and the password fo

5条回答
  •  离开以前
    2021-01-13 11:25

    Are you sure the data in your secret yaml is base64-encoded correctly? Using https://www.base64encode.org/, your data block is supposed to look like:

    data:
      mysql-root-password: VGVzdDEyMzQ= # Test1234
      mysql-user: dGVzdGFkbQ== # testadm
      mysql-password: VGVzdDEyMzQ= # Test1234
    

提交回复
热议问题