Questions tagged [kubernetes-pod]

Kubernetes-pod refers to Pods, the smallest deployable units of computing that can be created and managed in the cluster management software Kubernetes. Use this tag for questions related to this group of containers.

Kubernetes-pod refers to Pods, the smallest deployable units of computing that can be created and managed in the cluster management software Kubernetes. Use this tag for questions related to this group of containers.

2142 questions
11
votes
1 answer

Setup securityContext inside kubernetes deployment

I'm using a nfs mounted volume in my deployments. I need to give it the fsGroup like below: securityContext: runAsUser: 1000 runAsGroup: 3000 fsGroup: 2000 Is there a way to make this on the deployment manifest? As I can see on the…
11
votes
7 answers

Count of nodes which do not have a label?

How do I use kubectl to get K8S nodes which do not have any labels? Also , how do I fetch K8S pods which do not have any labels?
10
votes
2 answers

Changing the default k9s/Kubernetes context

I have 3 contexts set up in k9s (context1, context2, context3). I know I can change the context within k9s by typing :context but how do I change the default context that loads when I open k9s from context3 to context1?
Bhav
  • 1,957
  • 7
  • 33
  • 66
10
votes
2 answers

How to start K3s server after running k3s-killall.sh script

I was having K3s cluster with below pods running: kube-system pod/calico-node-xxxx kube-system pod/calico-kube-controllers-xxxxxx kube-system pod/metrics-server-xxxxx kube-system …
10
votes
2 answers

What are some pros and cons of parallel podManagementPolicy over OrderedReady podManagementPolicy in StatefulSets?

I have recently updated podManagementPolicy field in my StatefulSet from default(OrderedReady) to Parallel. It has significantly reduced the scale-up and scale-down time. I have not seen any downsides of this change as of now, but I am worried if…
10
votes
3 answers

Usage of --record in kubectl imperative commands in Kubernetes

I tried to find useful information when should i use --record. I created 3 commands: k set image deployment web1 nginx=lfccncf/nginx:latest --record k rollout undo deployment/web1 --record k -n kdpd00202 edit deployment web1 --record Could anyone…
O.Man
  • 585
  • 2
  • 9
  • 20
10
votes
2 answers

How can we see cached images in kubernetes?

I am using kops as kubernetes deployment. I noticed that whenever an image with same tag number is entered in deployment file the system takes the previous image if imagepullpolicy is not set to always Is there any way in which I can see all the…
10
votes
1 answer

Editing Kubernetes pod on-the-fly

For the debug and testing purposes I'd like to find a most convenient way launching Kubernetes pods and altering its specification on-the-fly. The launching part is quite easy with imperative commands. Running kubectl run nginx-test --image nginx…
esboych
  • 985
  • 2
  • 10
  • 16
10
votes
3 answers

How to Route to specific pod through Kubernetes Service (like a Gateway API)

I am running Kubernetes on "Docker Desktop" in Windows. I have a LoadBalancer Service for a deployment which has 3 replicas. I would like to access SPECIFIC pod through some means (such as via URL path : < serviceIP >:8090/pod1). Is there any way to…
Anthony
  • 205
  • 1
  • 2
  • 12
10
votes
5 answers

kubernetes cleanup of pods,service,deployment etc

To setup the kubernetes, I started with creating namespace, deployment, service. To clean the resources, do I need to follow any order like remove the service first then pods and then deployment and finally namespace? how to clean the resources in a…
intechops6
  • 1,007
  • 4
  • 22
  • 43
10
votes
1 answer

Is there a way in Kubernetes to check when hpa happened?

I have hpa configured for one of my deployment in Kubernetes. Is there any way to check if HPA scaling happened to the deployment and when it happened? I don't have prometheus or any monitoring solutions deployed.
karthikeayan
  • 4,291
  • 7
  • 37
  • 75
9
votes
1 answer

What is the need of defining .spec.selectors in Kubernetes Deployment.yaml file?

The .spec.selector field defines how the Deployment finds which Pods to manage. But we also defines labels inside template then what is the extra things we are getting with .spec.selectors field because Deployment can find the Pods to be managed…
9
votes
3 answers

Restart Pod when secrets gets updated

We are using secret as environment variables on pod, but every time we have updated on secrets, we are redeploying the pods to take changes effect. We are looking for a mechanism where Pods get restarted automatically whenever secrets gets updated.…
ramesh reddy
  • 429
  • 2
  • 5
  • 12
9
votes
1 answer

Minikube mounted host folders are not working

I am using ubuntu 18 with minikube and virtual box and trying to mount the host's directory in order to get the input data my pod needs. I found that minikube has issues with mounting host directories, but by default according to your OS and vm…
thebeancounter
  • 4,261
  • 8
  • 61
  • 109
9
votes
2 answers

Where are the possible metrics for kubernetes autoscaling defined

I'm trying to play with autoscaling scenarios (currently with microk8s single node personal cluster). Basic CPU scaling works fine. For the more complex scenarios, I'm trying to follow the guide at…
Vinay B
  • 673
  • 8
  • 21