Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
90 votes
3 answers
84k views

How to configure a Kubernetes Multi-Pod Deployment

I would like to deploy an application cluster by managing my deployment via Kubernetes Deployment object. The documentation has me extremely confused. My basic layout has the following components that ...
Raj's user avatar
  • 2,900
56 votes
3 answers
30k views

What is the difference between ReplicaSet and ReplicationController?

From what I can tell in the documentation, a ReplicaSet is created when running a Deployment. It seems to support some of the same features of a ReplicationController - scale up/down and auto restart, ...
David Knell's user avatar
  • 1,017
48 votes
5 answers
109k views

error when creating "deployment.yaml": Deployment in version "v1" cannot be handled as a Deployment

I am new to DevOps. I wrote a deployment.yaml file for a Kubernetes cluster I just created on Digital Oceans. Creating the deployment keeps bringing up errors that I can't decode for now. This is just ...
Famokunwa Toluwani's user avatar
42 votes
1 answer
22k views

Override env values defined in container spec

I have a configmap where I have defined the following key-value mapping in the data section: apiVersion: v1 kind: ConfigMap metadata: namespace: test name: test-config data: TEST: "...
asenovm's user avatar
  • 6,497
39 votes
5 answers
80k views

Deployment invalid: spec.template.metadata.labels: Invalid value

Deploying my service to production: envsubst < ./kubernetes/pre-production/aks.yaml | kubectl apply -f - I'm getting the following error: The Deployment "moverick-mule-pre" is invalid: spec....
agalisteo's user avatar
  • 573
36 votes
2 answers
59k views

How to delete a deployment / image in kubernetes

I'm running kubernetes in azure. I want to delete a specific deployment, with AZ AKS or kubectl. The only info I've found is how to delete pods, but this is not what I'm looking for, since pods will ...
Carlo Luther's user avatar
  • 2,462
29 votes
2 answers
103k views

Kubernetes deployment read-only filesystem error

I am facing an error while deploying Airflow on Kubernetes (precisely this version of Airflow https://github.com/puckel/docker-airflow/blob/1.8.1/Dockerfile) regarding writing permissions onto the ...
spaghettifunk's user avatar
20 votes
2 answers
36k views

How to check k8s deploy history?

I tried kubectl rollout history deployment/my-app, it returns only No rollout history found. I think there exists a method to get all the deploy histories. It will be very helpful. Reference ...
zseikyocho's user avatar
19 votes
5 answers
37k views

How to merge two configmaps using volume mount in kubernetes

I am having two different config maps test-configmap and common-config. I tried to mount them at the same location, but one config map overwrote the other. Then I read about subPath and did not work. ...
jack's user avatar
  • 351
17 votes
3 answers
4k views

How should I manage deployments with kubernetes

I am hoping to find a good way to automate the process of going from code to a deployed application on my kubernetes cluster. In order to build and deploy my app I need to first build the docker ...
Carl Minden's user avatar
16 votes
3 answers
15k views

How do I get one pod to network to another pod in Kubernetes? (SIMPLE)

I've been banging my head against this wall on and off for a while. There is a ton of information on Kubernetes on the web, but it's all assuming so much knowledge that n00bs like me don't really have ...
Peter Weyand's user avatar
  • 2,249
16 votes
5 answers
11k views

config-map kubernetes multiple environments

I am trying to deploy a Spring Boot application using configuration data from Kubernetes cluster. I have a simple RestController that prints a message by reading from a Kubernetes cluster. ...
A V's user avatar
  • 261
16 votes
1 answer
9k views

Why do I need save-config with kubctl apply?

kubectl apply <file.yaml> --save-config creates or updates a deployment and saves the deployment as metadata. In the documentation it says --save-config[=false]: If true, the configuration of ...
User12547645's user avatar
  • 8,029
14 votes
1 answer
19k views

How to verify that a Kubernetes deployment update has been successful?

I have a simple Kubernetes deployment. It consists of a single, unreplicated container. There is no service exposing the container. The container has a health check which checks that it is correctly ...
Ben Butler-Cole's user avatar
14 votes
4 answers
41k views

kubernetes deployment- container not starting- error- InvalidImageName

Below is the Kubernetes deployment yaml file -container image section: image: https://registry.ng.bluemix.net/****/test-service:test-branch-67 imagePullPolicy: Always Below is the error message ...
Raj kumar's user avatar
  • 161
13 votes
2 answers
13k views

Kubernetes job and deployment

can I run a job and a deploy in a single config file/action Where the deploy will wait for the job to finish and check if it's successful so it can continue with the deployment?
Igor Igeto Mitkovski's user avatar
12 votes
7 answers
29k views

How to Configure Pod initialization in a specific order in Kubernetes?

I want to know how I can start my deployments in a specific order. I am aware of initContainers but that is not working for me. I have a huge platform with around 20 deployments and 5 statefulsets ...
AVarf's user avatar
  • 4,981
11 votes
3 answers
4k views

Kubernetes Rolling Update not obeying 'maxUnavailable' replicas when redeployed in autoscaled conditions

In a nutshell, most of our apps are configured with the following strategy in the Deployment - strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate ...
gabbar0x's user avatar
  • 4,176
11 votes
2 answers
4k views

How do I change a k8s Deployment's matchLabels without downtime?

Kubernetes kind Deployment doesn't allow patch changes in spec.selector.matchLabels, so any new deployments (managed by Helm or otherwise) that want to change the labels can't use the RollingUpdate ...
snugghash's user avatar
  • 500
9 votes
4 answers
17k views

cant delete pod using kubctl delete pod <pod>

I want to delete a pod permanently so I can create the deployment.yaml and derveice.yaml again from fresh, so I tried: kubctl delete pod <pod> and the pod is still there, also tried: kubectl ...
jack miao's user avatar
  • 1,468
8 votes
3 answers
18k views

Application not showing in ArgoCD when applying yaml

I am trying to setup ArgoCD for gitops. I used the ArgoCD helm chart to deploy it to my local Docker Desktop Kubernetes cluster. I am trying to use the app of apps pattern for ArgoCD. The problem is ...
Matt's user avatar
  • 344
8 votes
2 answers
8k views

Kubernetes increase resources for all deployments

I am new to Kubernetes. I have a K8 cluster with multiple deployments (more than 150), each having more than 4 pods scaled. I have a requirement to increase resource limits for all deployments in the ...
Aniruddha Salve's user avatar
8 votes
1 answer
3k views

Two Kubernetes Deployments with exactly the same pod labels

Let's say I have two deployments which are exactly the same apart from deployment name: apiVersion: apps/v1 kind: Deployment metadata: name: nginx-d spec: replicas: 3 selector: matchLabels: ...
Maksim Sorokin's user avatar
8 votes
3 answers
2k views

Kubernetes multiple identical app and database deployments with different config

The dilemma: Deploy multiple app and database container pairs with identical docker image and code, but different config (different clients using subdomains). What are some logical ways to approach ...
Mick's user avatar
  • 413
8 votes
2 answers
20k views

why I am getting Read only file system error from Nginx?

Dear K8S community Team, I am getting this error message from nginx when I deploy my application pod. My application an angular6 app is hosted inside an nginx server, which is deployed as a docker ...
user6734184's user avatar
7 votes
4 answers
9k views

How to make an environment variable different across two pods of the same deployment in kubernetes?

Based on this it is possible to create environment variables that are the same across all the pods of the deployment that you define. Is there a way to instruct Kubernetes deployment to create pods ...
Dimitrios's user avatar
  • 465
6 votes
2 answers
16k views

How to assign a Deployment to a specific Node Pool

I am fairly new to Kubernetes and was able to set up a workflow including ingress. How can I specify which Deployments (not pods) go to a specific Node pool? Also, do namespaces have any effect on the ...
James's user avatar
  • 305
6 votes
1 answer
11k views

How to add nodeSelector to Deployment yaml file?

In the pods definition, we add the nodeSelector as a child of spec. But I'm not sure how to add this in deployment yaml file are we supposed to add it in the template's spec- apiVersion: apps/v1 kind: ...
AYUSHI NIGAM's user avatar
6 votes
1 answer
3k views

Helm Deployment vs Service

I am trying to understand k8s and helm. When I create a helm chart, there are 2 files: service.yaml and deployment.yaml. Both of them have a name field. If I understand correctly, the deployment ...
Ufder's user avatar
  • 517
6 votes
3 answers
5k views

StatefulSet recreates pod, why?

I have my deployment, where I have defined postgres statefulSet, however I have it without PVC so if pod is dead - all data is gone. If I will list all pods I see below picture: pod1 - Running - 10 ...
liotur's user avatar
  • 869
6 votes
1 answer
36k views

kubernetes deployment with args

As soon as I add, spec: containers: - args: - /bin/sh - '-c' - touch /tmp/healthy; touch /tmp/liveness env: to the deployment file, the application is ...
Subit Das's user avatar
  • 539
6 votes
1 answer
4k views

Reload Kubernetes deployment to fetch new secret without downtime

In Kubernetes I have a Deployment that uses a secret and injects them as environment variables: apiVersion: apps/v1 kind: Deployment ... envFrom: - secretRef: name: api-env I need to update ...
Justin's user avatar
  • 44.6k
6 votes
3 answers
10k views

Kubernetes Deployment Hanging

Following the Deployment example in the docs. I'm trying to deploy the example nginx. With the following config: apiVersion: extensions/v1beta1 kind: Deployment metadata: name: nginx-deployment ...
Darth_Evil's user avatar
6 votes
1 answer
9k views

error deploying image to kubernetes pod: "http: server gave HTTP response to HTTPS client"

i've got a kubernetes node, control-plane, which is untainted for deploying pods to. i've got a docker image sdmay23-42.ece.iastate.edu:5000/canvas-lti-frontend:v2. i'm signed into docker cli. the ...
Saile's user avatar
  • 195
6 votes
1 answer
7k views

Job invalid: `selector` not auto-generated

I have kubectl job that is invalid. I am debugging it and I extracted it to yaml file and I can see this: apiVersion: batch/v1 kind: Job metadata: creationTimestamp: 2020-03-19T21:40:11Z labels: ...
Bob's user avatar
  • 8,584
6 votes
3 answers
14k views

how to set different environment variables of Deployment replicas in kubernetes

I have 4 k8s pods by setting the replicas of Deployment to 4 now. apiVersion: v1 kind: Deployment metadata: ... spec: ... replicas: 4 ... The POD will get items in a database and consume it, ...
hxidkd's user avatar
  • 61
6 votes
1 answer
3k views

Kubernetes: Can not curl minikube pod

What happened: I have been following this guidelines: https://kubernetes.io/docs/setup/minikube/ and I have the "connection refused" issue when trying to curl the application. Here are the steps I did ...
Developer's user avatar
6 votes
2 answers
2k views

Kubernetes Deployments, Pod and Container concepts

I have started recently getting familiar with Kubernetes, however while I do get the concept I have some questions I am unable to answer clearly through Kubernete's Concept and Documentation, and some ...
Khaled's user avatar
  • 8,465
5 votes
2 answers
32k views

How to force a redeploy with HELM

I would like to use HELM to force a deployment to redeploy on Openshift. I am using "image@latest" for the deployment as I want to have the latest image whenever I deploy, but I don't want ...
LeYAUable's user avatar
  • 1,732
5 votes
2 answers
4k views

How to get current namespace from running pod usin client api

I am using kubernetes java client libraries in order to communicate with my kubernetes server. My question is there any way programmatically get namespace of running pod from inside of which sent ...
liotur's user avatar
  • 869
5 votes
1 answer
12k views

Kubectl create for persistent storage erroring out

I'm trying to deploy a persistent storage for couch DB and it is failing out with the error kubectl create -f couch_persistant_deploy.yaml error: error validating "couch_persistant_deploy.yaml&...
anish anil's user avatar
  • 2,569
5 votes
4 answers
13k views

Error from server (BadRequest): invalid character 's' looking for beginning of object key string

I am new to k8s and need some help, plz. I want to make a change in a pod's deployment configuration and change readOnlyRootFilesystem to false. This is what I am trying to do, but it doesn't seem to ...
Nitisha's user avatar
  • 51
5 votes
1 answer
4k views

Couldn't find type: v1.Deployment

I am following this tutorial. My objective was to create a Deployment made with a custom container instead of the hello container. I made this my-custom-server-deployment.yaml: apiVersion: v1 kind: ...
Tiago Bértolo's user avatar
5 votes
2 answers
3k views

gitlab + GKE + AutoDevops auto-deploy deploy fail. error: arguments in resource/name form must have a single resource and name. How to find a mistake?

I am new to gitlab CI. So I am trying to use https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml, to deploy simple test django app to the kubernetes ...
Testobile Testossimo's user avatar
5 votes
1 answer
7k views

What's the exact reason a pod-template-hash is added to the name of the replicaset when a deployment is created?

https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#creating-a-deployment mentions that a deployment creates a replicaSet but appends a pod-template-hash to the name of the ...
Prasath's user avatar
  • 595
5 votes
2 answers
5k views

How to make multiple pods communicate with each other on kubernetes

I am new to Kubernetes and I'm trying to deploy an application to kubernetes via microk8s. The application contains python flask backend, angular frontend, redis and mysql database. I deployed the ...
anju's user avatar
  • 167
5 votes
2 answers
6k views

update kubernetes deployment with jenkins

I'm using Kubernetes Continuous Deploy Plugin to deploy and upgrade a Deployment on my Kubernetes Cluster. I'm using pipeline and this is the Jenkinsfile: pipeline { environment { ...
Jayyrus's user avatar
  • 13k
5 votes
3 answers
4k views

kubectl kubectl apply do nothing

I have existing deployments in k8s, I would like to update container, I updated docker image tag (new unique id) in deployment and run: kubectl apply -f testdeploy.yml --namespace=myapp Output is: ...
nirebam368's user avatar
5 votes
1 answer
2k views

Kubernetes kubectl set image deployment not able to --record history?

According to the user guide it should be possible to update a deployment's image with kubectl set/edit and still get a meaningful history. However i'm getting some errors instead, and no meaningful ...
aristidesfl's user avatar
  • 1,360

1
2 3 4 5
12