...
Check the replicaSets
Code Block language bash kubectl get replicasets --namespace my-namespace
you see hivemq-operator and hivemq-cluster’s replicaSets
Code Block language text NAME DESIRED CURRENT READY AGE hivemq-6bb74cdd8b 1 1 0 4s hivemq-hivemq-operator-operator-5c788c6c4 1 1 1 55s
Check the hivemq-cluster replicaSet
Code Block language bash kubectl get replicaset hivemq-6bb74cdd8b -o yaml > output.yaml
Check for errors in the
conditions:
section. The error message will indicate why the creation of the hivemq-cluster pod has failed:
*This is an example error:Code Block language text conditions: - lastTransitionTime: "2022-09-22T12:58:03Z" message: 'pods "hivemq-5464688645-" is forbidden: unable to validate against any security context constraint: [provider "anyuid": Forbidden: not usable by user or serviceaccount, spec.initContainers[0].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000670000, 1000679999], spec.containers[0].securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1000670000, 1000679999], provider "restricted": Forbidden: not usable by user or serviceaccount, provider "nonroot-v2": Forbidden: not usable by user or serviceaccount, provider "nonroot": Forbidden: not usable by user or serviceaccount, provider "hostmount-anyuid": Forbidden: not usable by user or serviceaccount, provider "machine-api-termination-handler": Forbidden: not usable by user or serviceaccount, provider "hostnetwork-v2": Forbidden: not usable by user or serviceaccount, provider "hostnetwork": Forbidden: not usable by user or serviceaccount, provider "hostaccess": Forbidden: not usable by user or serviceaccount, provider "node-exporter": Forbidden: not usable by user or serviceaccount, provider "privileged": Forbidden: not usable by user or serviceaccount]' reason: FailedCreate status: "True" type: ReplicaFailure
Now you can fix the error and retry the
helm upgrade
.
...