Error: selector does not match template labels

It seems you are in trouble. Check this section: Label selector updates

Note: In API version apps/v1, a Deployment’s label selector is immutable after it gets created.

So, this line say you can not update selector once deployment is created. Selector can not be changed for any API version except apps/v1beta1 and extension/v1beta1. Ref: TestDeploymentSelectorImmutability.

One possible workaround might be to keep the old labels and adding new labels along with old ones. This way, you don’t have to update selector. Deployment will select pods using old labels but your dashboard can select using new labels. This might not meet your requirement but I don’t see any better way.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)