Demystifying Deployment labels in Kubernetes

Deployment “xxx is invalid: spec.template.metadata.labels: Invalid value: map[string]string{……}: `selector` does not match template `labels`
kubectl get all --show-labels | grep label-checker
kubectl get pod/<pod_name>  -o jsonpath='{.metadata.ownerReferences[0]}'
MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable
kubectl get pod/<pod_name>  -o jsonpath='{.metadata.ownerReferences[0]}'

--

--

--

Love writing and appreciating code. Believe in making a difference via technology. Working on full stack development. Talking for myself.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

WVB Operating System(Seventh Stage)

DynamoDB — Aggregate or Realtime calculating (Part3)

READ/DOWNLOAD#[ Hadoop in Practice: Includes 104 T

So you’re starting a new development team…

How to Install and Manage Multiple Python Versions in WSL2

Leetcode[669] Trim a Binary Search Tree

Define quality in a scrum environment

Install OCI-CLI quick setp-by-step guide

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Santosh Borse

Santosh Borse

Love writing and appreciating code. Believe in making a difference via technology. Working on full stack development. Talking for myself.

More from Medium

GitOps Fundamentals with Codefresh

Scrape RabbitMQ Metrics With Prometheus in Kubernetes

What is Argo Workflow Executor & how to choose the best executor for your application?

Strategies for setting up K8S cluster on Local Machine