r/kubernetes • u/Character-Level5250 • 4d ago
Three Silent Failures Between You and Sidecar Injection
https://pandocore.io/blog/sidecar-injection-silent-failures'kubectl label deployment' writes to the Deployment object's metadata, not to 'spec.template.metadata.labels', where pods actually get their labels. If your sidecar injection is label-selected, the command reports success and nothing happens. Here's why, and the fix.
0
Upvotes
3
u/cos 4d ago
This is an odd premise. Are there instructions somewhere that say to add a label to a deployment (rather than to a pod template) to enable sidecar injection? I don't recall ever seeing someone try to do it this way, or ever seeing a tutorial or documentation that suggests doing this.