LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Containers (https://www.linuxquestions.org/questions/linux-containers-122/)
-   -   kubectl ConfigMap creation fails (or so it seems).. (https://www.linuxquestions.org/questions/linux-containers-122/kubectl-configmap-creation-fails-or-so-it-seems-4175662737/)

emon_lq 10-18-2019 01:13 AM

kubectl ConfigMap creation fails (or so it seems)..
 
Hi everyone

I am trying to setup 'Single Sign On' via Active Directory on my Kubernetes cluster.

So I am trying to deploy Dex+Gangway.

Weird thing is that I can't seem to deploy a ConfigMap for Dex!!?

I am following this link
https://github.com/vmware-tanzu/tgik...39/yaml/05-dex

I have downloaded the files and modified them to work with LDAP.

Now when I do

Code:

kubectl apply -f ~/path/to/03-dex-configmap.yaml
It says

Code:

configmap/dex created
But can't seem to find it?!

Code:

kubectl delete configmap dex
Error from server (NotFound): configmaps "dex" not found

Also

Code:

kubectl get configmaps | grep dex
Returns nothing
I also tried

Code:

kubectl get configmaps
It lists other ConfigMaps that I have previously installed, but there is no 'dex'

But when I do

Code:

kubectl delete -f ~/path/to/03-dex-configmap.yaml
It says

Code:

configmap "dex" deleted
How did it delete something that did not exist!??
What am I doing wrong??

Thanks in advance
Emon

fantashley 01-06-2020 02:16 PM

I am guessing your current context is not the "dex" namespace, where it looks like the ConfigMap YAML is set to deploy to. Try either specifying the namespace using
Code:

kubectl get configmaps -n dex
or setting your current context by typing
Code:

kubectl config set-context --current --namespace=dex


All times are GMT -5. The time now is 11:58 AM.