Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

\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

  1. Describe the replicaSets:

    Code Block
    languagebash
    kubectl describe replicasets --namespace my-namespace

    you see hivemq-operator and hivemq-cluster's replicaSets:

    Code Block
    languagetext
    NAME                                             DESIRED   CURRENT   READY   AGE
    hivemq-6bb74cdd8b                           1         1         0       4s
    hivemq-hivemq-operator-operator-5c788c6c4   1         1         1       55s
  2. Get detained information from the hivemq-cluster's replicaSet:

    Code Block
    languagebash
    kubectl get replicaset hivemq-6bb74cdd8b -o yaml > output.yaml
  3. Search for any 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
    languageyaml
    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
  4. Now you can fix the error and retry the helm upgrade.

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@957
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel = "kb-troubleshooting-article" and type = "page" and space = "KB"
labelskb-troubleshooting-article