Reputation: 173
I run this command :
kubectl config get-contexts
and I don't get any namespace... but when I go in the dashboard I can see 2 namespaces created ?
config :
apiVersion: v1
clusters:
- cluster:
server: https://name_of_company
name: cluster
contexts:
- context:
cluster: cluster
user: ME
name: ME@cluster
current-context: ME@cluster
kind: Config
preferences: {}
users:
- name: MY NAME
user:
auth-provider:
config:
client-id: MY ID
id-token: MY ID TOKEN
idp-issuer-url: https://name_of_company/multiauth
name: oidc
Upvotes: 0
Views: 777
Reputation: 1362
kubectl get ns
gives the namespace (check here ), kubectl config get-contexts give the contexts in your kubeconfig which describe clusters, users, and contexts. Read here
Upvotes: 1
Reputation: 725
Please use the command kubectl get namespace
to list namespaces in a cluster.
Please check https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
Upvotes: 2