Skip to content

failed to call webhook: Post "..": tls: failed to verify certificate: x509: certificate signed by unknown authority #2237

Description

@cloud-66

Describe the bug

I Can't create cluster with error

 kubectl apply -f .\rabbit1.yaml
Error from server (InternalError): error when creating ".\\rabbit1.yaml": Internal error occurred: failed calling webhook "mrabbitmqcluster-v1beta1.kb.io": failed to call webhook: Post "https://cluster-operator-webhook-service.rabbitmq-system.svc:443/mutate-rabbitmq-com-v1beta1-rabbitmqcluster?timeout=10s": tls: failed to verify certificate: x509: certificate signed by unknown authority

To Reproduce

Steps to reproduce the behavior:

  1. install operator
    kubectl apply -f "https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator.yml"
>  kubectl apply -f .\cluster-operator.yml
namespace/rabbitmq-system unchanged
customresourcedefinition.apiextensions.k8s.io/rabbitmqclusters.rabbitmq.com unchanged
serviceaccount/rabbitmq-cluster-operator unchanged
role.rbac.authorization.k8s.io/rabbitmq-cluster-leader-election-role unchanged
clusterrole.rbac.authorization.k8s.io/rabbitmq-cluster-operator-role unchanged
clusterrole.rbac.authorization.k8s.io/rabbitmq-cluster-service-binding-role unchanged
rolebinding.rbac.authorization.k8s.io/rabbitmq-cluster-leader-election-rolebinding unchanged
clusterrolebinding.rbac.authorization.k8s.io/rabbitmq-cluster-operator-rolebinding unchanged
service/cluster-operator-webhook-service unchanged
service/rabbitmq-cluster-operator-metrics-service unchanged
deployment.apps/rabbitmq-cluster-operator unchanged
certificate.cert-manager.io/cluster-operator-serving-cert configured
certificate.cert-manager.io/metrics-certs configured
issuer.cert-manager.io/selfsigned-issuer unchanged
mutatingwebhookconfiguration.admissionregistration.k8s.io/cluster-operator-mutating-webhook-configuration configured
validatingwebhookconfiguration.admissionregistration.k8s.io/cluster-operator-validating-webhook-configuration configured
  1. Create cluster
    kubectl apply -f .\rabbit1.yaml
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: qdrcbrdev2
spec:
  persistence:
    storageClassName: local-storage-class
    storage: 10Gi
  tolerations:
  - effect: NoExecute
    key: dedicated.deckhouse.io
    operator: Equal
    value: system
  1. See error
Error from server (InternalError): error when creating ".\\rabbit1.yaml": Internal error occurred: failed calling webhook "mrabbitmqcluster-v1beta1.kb.io": failed to call webhook: Post "https://cluster-operator-webhook-service.rabbitmq-system.svc:443/mutate-rabbitmq-com-v1beta1-rabbitmqcluster?timeout=10s": tls: failed to verify certificate: x509: certificate signed by unknown authority

Expected behavior
I have cert-manager installer and certificate created .

Image

Version and environment information

  • RabbitMQ Cluster Operator: ghcr.io/rabbitmq/cluster-operator:2.22.5
  • Kubernetes: v1.33.10

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions