configmap

How to import custom dashboards to grafana using helm

陌路散爱 提交于 2020-06-25 10:06:22
问题 I'm trying to understand helm and I wonder if someone could ELI5 to me something or help me with something. So i did run below: helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/ Then I installed kube-prometheus by using below: helm install coreos/kube-prometheus --name kube-prometheus -f values.yaml --namespace monitoringtest Everything works fine but I'm trying to add some custom dashboards from json files and I'm struggling to understand how to do it. I was

How to save content of a configmap to a file with kubectl and jsonpath?

自作多情 提交于 2020-06-11 20:11:24
问题 I'm trying to save the contents of a configmap to a file on my local hard drive. Kubectl supports selecting with JSONPath but I can't find the expression I need to select just the file contents. The configmap was created using the command kubectl create configmap my-configmap --from-file=my.configmap.json=my.file.json When I run kubectl describe configmap my-configmap I see the following output: Name: my-configmap Namespace: default Labels: <none> Annotations: <none> Data ==== my.file.json: -

Failed to prepare subPath for volumeMount

好久不见. 提交于 2020-02-22 05:29:13
问题 Getting this error. Error: failed to prepare subPath for volumeMount "solr-collection-config" of container "upload-config-container" Using kubernetes 1.10.11 - name: upload-config-container image: solr:7.4.0-alpine imagePullPolicy: Always resources: requests: memory: "128Mi" cpu: "100m" limits: memory: "256Mi" cpu: "200m" volumeMounts: - name: solr-collection-config mountPath: /tell/carbon/conf subPath: conf solr-collection-config is a volume that represents a ConfigMap volumes: - name: solr

Cannot read configmap with name: [xx] in namespace ['default'] Ignoring

寵の児 提交于 2020-01-06 08:08:23
问题 New to k8s. Trying to read values from profile based config map. My configmap exists in default namespace. But, spring boot is not pickingup the values. Config map looks like: apiVersion: v1 kind: ConfigMap metadata: name: example-configmap-overriding-new-01 data: application.properties: |- globalkey = global key value application-qa.properties: |- globalkey = global key qa value application-prod.properties: |- globalkey = global key prod value The config map is created in default namespace

Can we use “data” as a yaml file instead of Json file in Config map

爷,独闯天下 提交于 2019-12-24 01:09:18
问题 lets take this example of a config map apiVersion: v1 kind: ConfigMap data: abc.yml: |- <yml here> Getting an error like failed to parse yaml to Json. 回答1: Yes you can do that, but you should care about the syntax. You can also follow techniques for yaml from here. If you use kubectl create configmap myconfig --from-file=abc.yml , then it is ok. But if you write the whole yaml file for your configmap in myconfig.yaml and then run kubectl create -f myconfig.yaml , then you should care about

How to patch a ConfigMap in Kubernetes

一个人想着一个人 提交于 2019-12-09 16:57:47
问题 Kubernetes ships with a ConfigMap called coredns that lets you specify DNS settings. I want to modify or patch a small piece of this configuration by adding: apiVersion: v1 kind: ConfigMap data: upstreamNameservers: | ["1.1.1.1", "1.0.0.1"] I know I can use kubectrl edit to edit the coredns ConfigMap is there some way I can take the above file containing only the settings I want to insert or update and have it merged on top of or patched over the existing ConfigMap ? The reason for this is

Override env values defined in container spec

霸气de小男生 提交于 2019-12-07 12:44:37
问题 I have a configmap where I have defined the following key-value mapping in the data section: apiVersion: v1 kind: ConfigMap metadata: namespace: test name: test-config data: TEST: "CONFIGMAP_VALUE" then in the definition of my container (in the deployment / statefulset manifest) I have the following: env: - name: TEST value: "ANOTHER_VALUE" envFrom: - configMapRef: name: test-config When doing this I was expecting that the value from the configmap (TEST="CONFIGMAP_VALUE") will override the

How to patch a ConfigMap in Kubernetes

南楼画角 提交于 2019-12-04 04:13:53
Kubernetes ships with a ConfigMap called coredns that lets you specify DNS settings. I want to modify or patch a small piece of this configuration by adding: apiVersion: v1 kind: ConfigMap data: upstreamNameservers: | ["1.1.1.1", "1.0.0.1"] I know I can use kubectrl edit to edit the coredns ConfigMap is there some way I can take the above file containing only the settings I want to insert or update and have it merged on top of or patched over the existing ConfigMap ? The reason for this is that I want my deployment to be repeatable using CI/CD. So, even if I ran my Helm chart on a brand new