kubernetes-deployment

Kubernetes getting sibling-pod IP/properties from the same deployment/replicaset

喜夏-厌秋 提交于 2021-02-11 14:21:38
问题 Need to set the ip and/or any metadata of the deployment to be available as env vars to each pod under the same deployment... ex: having a 3 replica deploment. need to set env var for other IP address for each of the two other pods. need to set the host name for each other two pods. as of having HOSTNAME=deplymentNAME-d74cf6f77-q57jx deplymentNAME_PORT=tcp://10.152.183.27:13000 need to add: HOSTNAME2=deplymentNAME-d74cf6f77-y67kl HOSTNAME3=deplymentNAME-d74cf6f77-i90ro deplymentNAME_PORT2=tcp

What is the difference between current and available pod replicas in kubernetes deployment?

那年仲夏 提交于 2021-02-07 07:59:34
问题 I am trying to get my hands dirty on Kubernetes. I am firing following command: kubectl get deployment and I get the following headers in the output: I can't find the difference between current and available columns in the following output? I know that official documentation gives a small description each of these fields, but it doesn't answer my following questions: Is Current <= Desired true? Is Up-to-Date <= Current true? Is Up-to-Date > Current and Up-to-Date <= Desired true? Is Available

What is the difference between current and available pod replicas in kubernetes deployment?

对着背影说爱祢 提交于 2021-02-07 07:59:31
问题 I am trying to get my hands dirty on Kubernetes. I am firing following command: kubectl get deployment and I get the following headers in the output: I can't find the difference between current and available columns in the following output? I know that official documentation gives a small description each of these fields, but it doesn't answer my following questions: Is Current <= Desired true? Is Up-to-Date <= Current true? Is Up-to-Date > Current and Up-to-Date <= Desired true? Is Available

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

How to apply patch to make pod phase go to Succeeded or Failed?

我是研究僧i 提交于 2020-12-15 05:23:27
问题 This is a follow-up from my last question - How to programmatically modify a running k8s pod status conditions? after which I realized, you can only patch the container spec from the deployment manifest to seamlessly let the controller apply the patch changes to the pods through the ReplicaSet it created. Now my question is how to apply patch to make the Pod phase to go to Succeeded or Failed . I know for e.g. for pod phase to go to Succeeded , all the containers need to terminate

How to apply patch to make pod phase go to Succeeded or Failed?

时光毁灭记忆、已成空白 提交于 2020-12-15 05:23:27
问题 This is a follow-up from my last question - How to programmatically modify a running k8s pod status conditions? after which I realized, you can only patch the container spec from the deployment manifest to seamlessly let the controller apply the patch changes to the pods through the ReplicaSet it created. Now my question is how to apply patch to make the Pod phase to go to Succeeded or Failed . I know for e.g. for pod phase to go to Succeeded , all the containers need to terminate

How to edit all the deployment of kubernetes at a time

走远了吗. 提交于 2020-03-18 10:08:28
问题 We have hundreds of deployment and in the config we have imagePullPolicy set as “ifnotpresent” for most of them and for few it is set to “always” now I want to modify all deployment which has ifnotpresent to always . How can we achieve this with at a stroke? Ex: kubectl get deployment -n test -o json | jq ‘.spec.template.spec.contianer[0].imagePullPolicy=“ifnotpresent”| kubectl -n test replace -f - The above command helps to reset it for one particular deployment. 回答1: Kubernetes doesn't

How to edit all the deployment of kubernetes at a time

不问归期 提交于 2020-03-18 10:08:17
问题 We have hundreds of deployment and in the config we have imagePullPolicy set as “ifnotpresent” for most of them and for few it is set to “always” now I want to modify all deployment which has ifnotpresent to always . How can we achieve this with at a stroke? Ex: kubectl get deployment -n test -o json | jq ‘.spec.template.spec.contianer[0].imagePullPolicy=“ifnotpresent”| kubectl -n test replace -f - The above command helps to reset it for one particular deployment. 回答1: Kubernetes doesn't