Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIXED NAMESPACE #6861

Closed
Zenitugo opened this issue Mar 15, 2024 · 3 comments
Closed

MIXED NAMESPACE #6861

Zenitugo opened this issue Mar 15, 2024 · 3 comments

Comments

@Zenitugo
Copy link

Zenitugo commented Mar 15, 2024

Describe the bug:

I am trying to install cert-manager on my EKS cluster using the command below.

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.4/cert-manager.yaml --namespace cert-manager

The Error Message:

the namespace from the provided object "kube-system" does not match the namespace "cert-manager". You must pass '--namespace=kube-system' to perform this operation.

Expected behaviour: I expected it to deploy successfully because I created a namespace called cert-manager but unfortunately that was not the case.

I downloaded the YAML file to my local computer and I can see the code to create a namespace called cert-manager but I noticed the namespace was not specified in all the play. But I didn't think it should matter when the command I am using has instructed kubectl to deploy in the cert-manager

The last two plays in the YAML files are named mutatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook created and validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook created

I don't understand these error messages coming after they were successfully created

mutatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook created
the namespace from the provided object "kube-system" does not match the namespace "cert-manager". You must pass '--namespace=kube-system' to perform this operation.
the namespace from the provided object "kube-system" does not match the namespace "cert-manager". You must pass '--namespace=kube-system' to perform this operation.
validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook created
the namespace from the provided object "kube-system" does not match the namespace "cert-manager". You must pass '--namespace=kube-system' to perform this operation.
the namespace from the provided object "kube-system" does not match the namespace "cert-manager". You must pass '--namespace=kube-system' to perform this operation.

Please I need help. What can I do to solve this?

@Zenitugo
Copy link
Author

I Just found out it works without the namespace attached to the command. So simply run

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.4/cert-manager.yaml

@inteon
Copy link
Member

inteon commented Mar 18, 2024

Leader election uses kube-system by default, that is why you are seeing that error message.
This PR actually wants to change the default leader election namespace: #6766, which would fix the issue you were seeing.

@inteon
Copy link
Member

inteon commented Apr 10, 2024

Closing in favor of #6766

@inteon inteon closed this as completed Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants