Skip to content

AdmissionWebhook fails on AWS EKS with custom CNI #899

@martin31821

Description

@martin31821

Describe the bug

Error from server (InternalError): error when creating "emqx.yaml": Internal error occurred: failed calling webhook "mutating.apps.emqx.io": failed to call webhook: Post "https://emqx-operator-webhook-service.emqx-operator-system.svc:443/mutate-apps-emqx-io-v2beta1-emqx?timeout=10s": Address is not allowed

Background:
AWS EKS calls webhooks from the Control Plane, which in case of a CNI other than the default VPC CNI results in Pod IPs not reachable from the control plane.

To Reproduce

  1. AWS EKS Cluster
  2. Use Cilium as CNI
  3. Install EMQX Operator
  4. Create EMQX Instance
  5. Error Message as above.

Expected behavior

Expected the EMQX Cluster to be created

Anything else we need to know?:

Environment details::

  • Kubernetes version: 1.25.6 EKS
  • Cloud-provider/provisioner: EKS + Terraform
  • emqx-operator version: 2.2.0
  • Install method: Helm

Potential Fix:

It would be good to include a mode to enable HostNetwork for the controller-manager in order to allow the EKS control plane to reach the pod.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions