Open axel7083 opened 11 months ago
I think each context has a namespace
Usage:
kubectl config set-context [NAME | --current] [--cluster=cluster_nickname] [--user=user_nickname]
[--namespace=namespace] [options]
You can view the current value in CLI:
$ kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* kind-kind kind-kind kind-kind
I think each context has a namespace
Usage: kubectl config set-context [NAME | --current] [--cluster=cluster_nickname] [--user=user_nickname] [--namespace=namespace] [options]
You can view the current value in CLI:
$ kubectl config get-contexts CURRENT NAME CLUSTER AUTHINFO NAMESPACE * kind-kind kind-kind kind-kind
I don't know how the context would be used specifically in the use case I am seeing. I was thinking for instance, when I am downloading a kubeconfig from rancher for example, it looks like this
apiVersion: v1
kind: Config
clusters:
- name: "<name>"
cluster:
server: <server>
certificate-authority-data: <cert>
users:
- name: "<name>"
user:
token: <token>
contexts:
- name: "<name>"
context:
user: "<name>"
cluster: "<name>"
current-context: "<name>"
There is no preferred namespace configured, but I do only have access to one namespace, thus, leading to error when importing the config in some Kubernetes dashboards. Some of those dashboard offer a way to configured the "Accessible namespaces"
You should be able to add one with kubectl config set-context <name> --namespace=<name>
contexts:
- context:
cluster: kind-kind
namespace: kind-kind
user: kind-kind
name: kind-kind
The default is empty (and omitted)
It's still a nice feature to show it it in the UI, and include it in the editable fields when available.
This issue has been automatically marked as stale because it has not had activity in the last 6 months. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!
Keep open
Is your feature request related to a problem? Please describe
When using external cluster, we might want to use a specific namespace by default or we might not have access to the default namespace.
Describe the solution you'd like
In the Kubernetes settings, being able to set the preferred namespace.
This settings could be reflected when generating kube.
Describe alternatives you've considered
No response
Additional context
I do not know if podman-desktop have some kind of internal persistency system ?