kubectl

How to set kube-proxy settings using kubectl on AKS

你离开我真会死。 提交于 2021-02-20 19:08:01
问题 I keep reading documentation that gives parameters for kube-proxy, but does not explain how where these parameters are supposed to be used. I create my cluster using az aks create with the azure-cli program, then I get credentials and use kubectl. So far everything I've done has involved yaml for services and deployments and such, but I can't figure out where all this kube-proxy stuff fits into all of this. I've googled for days. I've opened question issues on github with AKS. I've asked on

How to set kube-proxy settings using kubectl on AKS

孤街浪徒 提交于 2021-02-20 19:05:21
问题 I keep reading documentation that gives parameters for kube-proxy, but does not explain how where these parameters are supposed to be used. I create my cluster using az aks create with the azure-cli program, then I get credentials and use kubectl. So far everything I've done has involved yaml for services and deployments and such, but I can't figure out where all this kube-proxy stuff fits into all of this. I've googled for days. I've opened question issues on github with AKS. I've asked on

Kubernetes: Display Pods by age in ascending order

空扰寡人 提交于 2021-02-18 20:58:41
问题 I use below command to sort the pods by age kubectl get pods --sort-by={metadata.creationTimestamp} It shows up pods in descending order. How can we select sorting order like ascending? 回答1: Sorted kubectl output and awk provide the table view with a header. Installation of extra tools is not needed. # kubectl get pods --sort-by=.status.startTime | awk 'NR == 1; NR > 1 {print $0 | "tac"}' An approach with JSON processor offered by paulogrell works also but could require more effort: for some

Kubernetes: Display Pods by age in ascending order

夙愿已清 提交于 2021-02-18 20:58:38
问题 I use below command to sort the pods by age kubectl get pods --sort-by={metadata.creationTimestamp} It shows up pods in descending order. How can we select sorting order like ascending? 回答1: Sorted kubectl output and awk provide the table view with a header. Installation of extra tools is not needed. # kubectl get pods --sort-by=.status.startTime | awk 'NR == 1; NR > 1 {print $0 | "tac"}' An approach with JSON processor offered by paulogrell works also but could require more effort: for some

Kubernetes error: Unable to connect to the server: dial tcp 127.0.0.1:8080

ぃ、小莉子 提交于 2021-02-18 11:45:15
问题 I'm seeing the following error when running kubectl get pods : Unable to connect to the server: dial tcp 127.0.0.1:8080: connectex: No connection could be made because the target machine actively refused it. This was working when I ran it two weeks ago. My config file in the ~/.kube/config directory looks as follows: apiVersion: v1 clusters: - cluster: insecure-skip-tls-verify: true server: https://zld05687.vci.co.com name: dev-cluster - cluster: insecure-skip-tls-verify: true server: https:/

Determine what resource was not found from “Error from server (NotFound): the server could not find the requested resource”

淺唱寂寞╮ 提交于 2021-02-18 10:36:06
问题 I'm running kubectl create -f notRelevantToThisQuestion.yml The response I get is: Error from server (NotFound): the server could not find the requested resource Is there any way to determine which resource was requested that was not found? kubectl get ns returns NAME STATUS AGE default Active 243d kube-public Active 243d kube-system Active 243d This is not a cron job. Client version 1.9 Server version 1.6 This is very similar to https://devops.stackexchange.com/questions/2956/how-do-i-get

Add random string on Kubernetes pod deployment name

≡放荡痞女 提交于 2021-02-18 06:36:36
问题 I have a template that is basically an utility container for running kubectl inside a pod. What I want to do, is to be able to have multiple deployments of that same template, with different names, as in "utilitypod-randomID". Is there a way to do that, via kubectl and some shell scripting, or something similar? The current template looks like this: apiVersion: v1 kind: Pod metadata: name: utilitypod namespace: blah-dev labels: purpose: utility-pod spec: containers: - name: utilitypod image:

Add random string on Kubernetes pod deployment name

旧街凉风 提交于 2021-02-18 06:36:09
问题 I have a template that is basically an utility container for running kubectl inside a pod. What I want to do, is to be able to have multiple deployments of that same template, with different names, as in "utilitypod-randomID". Is there a way to do that, via kubectl and some shell scripting, or something similar? The current template looks like this: apiVersion: v1 kind: Pod metadata: name: utilitypod namespace: blah-dev labels: purpose: utility-pod spec: containers: - name: utilitypod image:

Kubernetes / kubectl - “A container name must be specified” but seems like it is?

那年仲夏 提交于 2021-02-17 21:05:11
问题 I'm debugging log output from kubectl that states: Error from server (BadRequest): a container name must be specified for pod postgres-operator-49202276-bjtf4, choose one of: [apiserver postgres-operator] OK, so that's an explanatory error message, but looking at my JSON template it ought to just create both containers specified, correct? What am I missing? (please forgive my ignorance.) I'm using just a standard kubectl create -f command to create the JSON file within a shell script. The

Mac terminal command input too long it does not fit?

为君一笑 提交于 2021-02-10 21:12:37
问题 I need to run the command: kubectl get pvc --field-selector metadata.name!=dataX********************************,******************************************************************,************************************************************************************************,************************************************************************************************,************************************************,*************************************************,************************