\uD83E\uDD14 Problem
Deploying a HiveMQ cluster from the hivemq-operator
Helm chart to a Kubernetes cluster:
...
Problem is how to troubleshoot this.
\uD83C\uDF31 Solution
...
Describe the
replicaSets
:Code Block language bash kubectl
...
describe replicasets --namespace my-namespace
you see
hivemq-operator
andhivemq-
...
cluster
'sreplicaSets
:Code Block language text NAME DESIRED CURRENT READY AGE hivemq-6bb74cdd8b 1 1 0 4s hivemq-hivemq-operator-operator-5c788c6c4 1 1 1 55s
...
Get detained information from the
hivemq-cluster
'sreplicaSet
:Code Block language bash kubectl get replicaset hivemq-6bb74cdd8b -o yaml > output.yaml
...
Search for any errors in the
conditions:
section. The error message will indicate why the creation of thehivemq-cluster
pod has failed:
*This is an example error:Code Block language
...
yaml 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
.
\uD83D\uDCCE Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|