The Deployment myweb-rs is invalid spec template metadata labels Invalid value map string string name mysql selector does not match template labels

0 votes

Hi Guys,

I am trying to create deployment resource in minikube cluster. But it is showing me the below error.

$ kubectl create -f dep_mysql.yml
The Deployment "myweb-rs" is invalid: spec.template.metadata.labels: Invalid value: map[string]string{"name":"mysql"}: `selector` does not match template `labels`

How can I solve this?

May 22, 2020 in Kubernetes by akhtar
• 38,260 points
2,762 views

1 answer to this question.

0 votes

Hi@akhtar,

I think, there may be a mismatch in labels. Make sure you have written the same labels for your deployment as well as Pod. When you create one deployment, internally these labels connects to pod labels and launch the containers.

answered May 22, 2020 by MD
• 95,460 points

Related Questions In Kubernetes

+1 vote
1 answer
0 votes
1 answer

Error saying "The specified bucket does not exist" in kubernetes

Bucket is created in another region. Looks like ...READ MORE

answered Aug 31, 2018 in Kubernetes by Kalgi
• 52,350 points
4,130 views
0 votes
1 answer

Error saying "the program 'curl' is currently not installed"

Install curl using this command: apt-get update && ...READ MORE

answered Nov 23, 2018 in Kubernetes by Hannah
• 18,520 points
2,196 views
0 votes
1 answer

How to determine what is the status of a deployment ?

You could use kubectl get deployment <deployment>.  If ...READ MORE

answered Jul 12, 2019 in Kubernetes by Sirajul
• 59,230 points
679 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,571 views
0 votes
1 answer

permissions related to AWS ECR

if you add allowContainerRegistry: true, kops will add those permissions ...READ MORE

answered Oct 9, 2018 in Kubernetes by Kalgi
• 52,350 points
1,427 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP