Kubernetes config map symlinks (..data/) : is there a way to avoid them?

I think this solution is satisfactory : specifying exact file path in mountPath, will get rid of the symlinks to ..data and ..2018_06_04_19_31_41.860238952 So if I apply such a manifest : apiVersion: v1 kind: Pod metadata: name: my-lamp-site spec: containers: – name: php image: php:7.0-apache volumeMounts: – mountPath: /var/www/html/users.xml name: site-data subPath: users.xml volumes: – … Read more

Is there a way to share a configMap in kubernetes between namespaces?

Kubernetes 1.13 and earlier They cannot be shared, because they cannot be accessed from a pods outside of its namespace. Names of resources need to be unique within a namespace, but not across namespaces. Workaround it is to copy it over. Copy secrets between namespaces kubectl get secret <secret-name> –namespace=<source-namespace> –export -o yaml \ | kubectl apply –namespace=<destination-namespace> … Read more

Override env values defined in container spec

From Kubernetes API reference: envFrom : List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will … Read more

Kubernetes – How to define ConfigMap built using a file in a yaml?

Your config.json file should be inside your mychart/ directory, not inside mychart/templates Chart Template Guide configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: {{ .Release.Name }}-configmap data: config.json: |- {{ .Files.Get “config.json” | indent 4}} config.json { “val”: “key” } helm install –dry-run –debug mychart [debug] Created tunnel using local port: ‘52091’ [debug] SERVER: “127.0.0.1:52091” … … Read more

Restart pods when configmap updates in Kubernetes?

The current best solution to this problem (referenced deep in https://github.com/kubernetes/kubernetes/issues/22368 linked in the sibling answer) is to use Deployments, and consider your ConfigMaps to be immutable. When you want to change your config, create a new ConfigMap with the changes you want to make, and point your deployment at the new ConfigMap. If the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)