kubernetes-sigs / hierarchical-namespaces

Home of the Hierarchical Namespace Controller (HNC). Adds hierarchical policies and delegated creation to Kubernetes namespaces for improved in-cluster multitenancy.
Apache License 2.0
607 stars 105 forks source link

Use the default namespace in the kubeconfig #347

Closed superbrothers closed 6 months ago

superbrothers commented 9 months ago

hns command will fail to execute if the -namespace option is not specified.

$ kubectl hns create foo
Error: parent must be set via --namespace or -n

On the other hand, kubectl uses the default namespace set in kubeconfig if not specified. I think hns command's behavior should be aligned with kubectl's.

What do you think?

yanggangtony commented 9 months ago

+1 Make sense for me.

superbrothers commented 9 months ago

I'll make a PR.

yanggangtony commented 9 months ago

I have done it. wait.

superbrothers commented 9 months ago

OK. Thanks.

k8s-triage-robot commented 6 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale