Pod status as `CreateContainerConfigError` in Minikube cluster

后端 未结 6 1817
挽巷
挽巷 2021-02-05 00:18

I am trying to run Sonarqube service using the following helm chart.

So the set-up is like it starts a MySQL and Sonarqube service in the minikube cluster a

6条回答
  •  时光说笑
    2021-02-05 00:46

    Try to use the option --from-env-file instead of --from-file and see if this problem disappears. I got the same error and looking into the pod events, it suggested that the key-value pairs inside the mysecrets.txt file is not properly read. If you have only one line, Kubernetes takes the content inside the file as value and the filename as key. To avoid this issue, you need to read the file as environment variable files as shown below.

    mysecrets.txt:

    MYSQL_PASSWORD=dfsdfsdfkhk
    

    For example:

    kubectl create secret generic secret-name --from-env-file=mysecrets.txt
    kubectl create configmap generic configmap-name --from-env-file=myconfigs.txt
    

提交回复
热议问题