kubectl Questions

3

Solved

Kubernetes dashboard is able to show "current running pods / pods capacity" per node. But when I try to get the same info with kubectl I have to run two commands: kubectl describe node | grep -E (...
Enscroll asked 2/10, 2019 at 12:47

9

Solved

I am running an application with GKE. It works fine but I can not figure out how to get the external IP of the service in a machine readable format. So i am searching a gcloud or kubectl command th...
Sloven asked 25/12, 2017 at 14:48

1

Is it possible to log individual shell commands executed after login to pod via kubectl exec? If auditing shell commands is possible, how to configure kubernetes auditing for that?
Satisfactory asked 4/3, 2020 at 14:16

4

Solved

I have been trying to forward multiple ports with these commands: kubectl port-forward deployment/service1 8080:8080 && kubectl port-forward deployment/service2 8081:8081 and kubectl port-...
Issuance asked 14/7, 2022 at 12:10

2

I am using Kubectl run command to execute pod on a specific node. kubectl --namespace=ns run pod1 --image image1 \ --overrides='{"spec":{"nodeSelector":{"appgroup":&q...
Skeen asked 30/10, 2022 at 7:24

7

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?
Swede asked 31/7, 2019 at 15:54

6

Solved

Cannot install the helm chart but when I use raw file generated by helm, I am able to install via kubectl apply. Following error is displayed when i use helm install myChart . --debug Error: cannot...
Drumm asked 23/12, 2021 at 16:23

14

Solved

I can delete all jobs inside a custer running kubectl delete jobs --all However, jobs are deleted one after another which is pretty slow (for ~200 jobs I had the time to write this question and...
Np asked 28/4, 2017 at 8:10

24

Solved

I'm currently facing an issue with my Kubernetes clusters and need some assistance. Everything was running smoothly until today. However, after performing an update on my Ubuntu system, I'm unable ...
Goodkin asked 5/8, 2023 at 13:33

7

I am looking to output a comma separated list of all user accounts from Kubernetes. I understand that one can return a list of namespaces, pods, and so on from Kubernetes using the 'kubectl get nam...
Belleslettres asked 11/11, 2021 at 17:12

6

Solved

I am trying to deploy a mongo db deployment together with service, as follows: apiVersion: apps/v1 kind: Deployment metadata: name: mongo-deployment labels: app: mongo spec: replicas: 1 select...
Zsazsa asked 23/1, 2022 at 1:43

6

Solved

I'm trying to follow GitHub - kubernetes/dashboard: General-purpose web UI for Kubernetes clusters. deploy/access: # export KUBECONFIG=/etc/kubernetes/admin.conf # kubectl create -f https://raw.g...
Gerrigerrie asked 19/10, 2018 at 3:29

6

Solved

I have a pod running and want to port forward so i can access the pod from the internal network. I don't know what port it is listening on though, there is no service yet. I describe the pod: $ k...
Bouchard asked 19/12, 2019 at 12:27

2

Solved

I have base/foo.yaml that I want to apply to all my environments and it partially looks like this Kubernetes: deploymentPatches: - patch: |- - {"op": "add", "path":...
Murr asked 25/3, 2022 at 19:53

4

Solved

I created new config file for Kubernetes from Azure in Powershell by az aks get-credentials --resource-group <RGName> --name <ClusterName>. Got a message that Merged "cluster_name&...
Strenuous asked 12/4, 2023 at 10:52

9

Solved

I am using kubectl in order to retrieve a list of pods: kubectl get pods --selector=artifact=boot-example -n my-sandbox The results which I am getting are: NAME READY STATUS RESTARTS AGE boot...
Amuse asked 22/11, 2019 at 10:55

13

Solved

I am doing a lab setup of EKS/Kubectl and after the completion cluster build, I run the following: > kubectl get node And I get the following error: Unable to connect to the server: getting cr...
Drisko asked 21/1, 2020 at 0:19

6

Solved

I'm new to kubernetes and am wondering if there's a way for me to see a list of all currently configured port forwards using kubectl ? I see there's a kubectl port-forward command, but it doesn't ...
Tehuantepec asked 15/11, 2019 at 14:11

5

Solved

I found specifying like kubectl --context dev --namespace default {other commands} before kubectl client in many examples. Can I get a clear difference between them in a k8's environment?
Martinet asked 12/4, 2020 at 12:28

5

Solved

Is there a way to create a namespace with one label using kubectl? e.g. kubectl create ns <newnamespace> label=appid:foo12 as opposed to using kubectl apply -f <somefile>
Blunder asked 26/7, 2021 at 15:28

2

Solved

I have an instance of a Kubernetes Custom Resource that I want to patch via the Kubernetes API using a JSON patch. This is my PATCH request: PATCH /apis/example.com/v1alpha1/namespaces/default/my...
Charitycharivari asked 13/8, 2019 at 14:45

3

Solved

I'm trying to follow the instructions at https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md to create a Kubernetes Dashboard token. However, when I...
Conglomeration asked 2/6, 2022 at 19:53

3

Solved

I'm using MicroK8S in Ubuntu. I'm trying to run a simple "hello world" program but I got the error when a pod is created. kubelet does not have ClusterDNS IP configured and cannot create...
Psychotherapy asked 1/1, 2020 at 6:56

3

Solved

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. T...
Tapestry asked 9/8, 2018 at 13:58

5

Solved

If I run kubectl get services for a simple demo service I get the following response: NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE demo-service LoadBalancer 10.104.48.115 <pending> 80:32264/...
Minard asked 13/9, 2019 at 7:58

© 2022 - 2025 — McMap. All rights reserved.