configmap

Kubernetes: How to set boolean type variable in configMap

限于喜欢 提交于 2021-02-05 07:09:49
问题 I want to set a boolean variable in configMap (or secret): apiVersion: v1 kind: ConfigMap metadata: name: env-config namespace: mlo-stage data: webpack_dev_server: false But when I apply it, I get the following error: The request is invalid: patch: Invalid value: "map[data:map[webpack_dev_server:false] metadata:map[annotations:map[kubectl.kubernetes.io/last-applied-configuration:{ blah blah blah}]]]": unrecognized type: string I have tried to change the value to Off/No/False, all having the

Kubernetes: How to set boolean type variable in configMap

时光毁灭记忆、已成空白 提交于 2021-02-05 07:08:07
问题 I want to set a boolean variable in configMap (or secret): apiVersion: v1 kind: ConfigMap metadata: name: env-config namespace: mlo-stage data: webpack_dev_server: false But when I apply it, I get the following error: The request is invalid: patch: Invalid value: "map[data:map[webpack_dev_server:false] metadata:map[annotations:map[kubectl.kubernetes.io/last-applied-configuration:{ blah blah blah}]]]": unrecognized type: string I have tried to change the value to Off/No/False, all having the

Kubernetes: How to set boolean type variable in configMap

牧云@^-^@ 提交于 2021-02-05 07:07:19
问题 I want to set a boolean variable in configMap (or secret): apiVersion: v1 kind: ConfigMap metadata: name: env-config namespace: mlo-stage data: webpack_dev_server: false But when I apply it, I get the following error: The request is invalid: patch: Invalid value: "map[data:map[webpack_dev_server:false] metadata:map[annotations:map[kubectl.kubernetes.io/last-applied-configuration:{ blah blah blah}]]]": unrecognized type: string I have tried to change the value to Off/No/False, all having the

Use kubectl patch to add DNS Rewrite Rule to CoreDNS Configmap

﹥>﹥吖頭↗ 提交于 2021-01-29 05:07:10
问题 I want to use the kubectl patch command to add a DNS rewrite rule to the coredns configmap, as described at Custom DNS Entries For Kubernetes. The default config map looks like this: apiVersion: v1 data: Corefile: | .:53 { log errors health kubernetes cluster.local in-addr.arpa ip6.arpa { pods insecure upstream fallthrough in-addr.arpa ip6.arpa ttl 30 } prometheus :9153 forward . /etc/resolv.conf cache 30 loop reload loadbalance } kind: ConfigMap .... and I want to add the line rewrite name

How to set the ssl-session-cache values in configmap - kubernetes?

白昼怎懂夜的黑 提交于 2021-01-27 17:50:24
问题 I try to set the value of the ssl-session-cache in my configmap for ingress-controller, the problem is, that i can't find how to write it correct. I need following changes in the nginx config: ssl-session-cache builtin:3000 shared:SSL:100m ssl-session-timeout: 3000 when i add ssl-session-timeout: "3000" to the config map, it works correct - this i can see in nginx-config few seconds later. but how i should write ssl-session-cache? ssl-session-cache: builtin:"3000" shared:SSL:"100m" goes well,

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

给你一囗甜甜゛ 提交于 2020-12-21 14:28:29
问题 At present I am creating a configmap from the file config.json by executing: kubectl create configmap jksconfig --from-file=config.json I would want the ConfigMap to be created as part of the deployment and tried to do this: apiVersion: v1 kind: ConfigMap metadata: name: jksconfig data: config.json: |- {{ .Files.Get "config.json" | indent 4 }} But doesn't seem to work. What should be going into configmap.yaml so that the same configmap is created? ---UPDATE--- when I do a helm install dry run

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

自古美人都是妖i 提交于 2020-12-21 14:28:25
问题 At present I am creating a configmap from the file config.json by executing: kubectl create configmap jksconfig --from-file=config.json I would want the ConfigMap to be created as part of the deployment and tried to do this: apiVersion: v1 kind: ConfigMap metadata: name: jksconfig data: config.json: |- {{ .Files.Get "config.json" | indent 4 }} But doesn't seem to work. What should be going into configmap.yaml so that the same configmap is created? ---UPDATE--- when I do a helm install dry run

Create configmaps from files recursively

此生再无相见时 提交于 2020-08-08 05:40:26
问题 I have multiple configuration files in two directories. For example, conf.d/parentconf1.conf con.d/node1/child1.conf conf.d/node2/child2.conf I need to mount these configuration files in the same directory structure to kubernetes pod using ConfigMap . Tried using the kubectl create configmap --from-file=./conf.d --from-file=./conf.d/node1/child1.conf --from-file=./conf.d/node2/child2.conf. Config map created, as expected, cannot express the nested directory structure. Is it possible to create

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

好久不见. 提交于 2020-08-01 06:13:38
问题 I have noticed that when I create and mount a config map that contains some text files, the container will see those files as symlinks to ../data/myfile.txt . For example, if my config map is named tc-configs and contains 2 xml files named stripe1.xml and stripe2.xml, if I mount this config map to /configs in my container, I will have, in my container : bash-4.4# ls -al /configs/ total 12 drwxrwxrwx 3 root root 4096 Jun 4 14:47 . drwxr-xr-x 1 root root 4096 Jun 4 14:47 .. drwxr-xr-x 2 root

How to import custom dashboards to grafana using helm

我只是一个虾纸丫 提交于 2020-06-25 10:08:20
问题 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