vcenter_supervisor_kubeconfig

Supervisor-issued kubeconfig fetch (VKS).

On a Supervisor-enabled cluster, vCenter exposes a kubeconfig endpoint that returns a YAML document an operator can hand to kubectl, saltext-kubernetes, or any standard Kubernetes client to talk to the Supervisor API server.

The endpoint path matches the namespace-management v2 surface:

GET /api/vcenter/namespaces/user/kubeconfig

with a per-cluster variant under /api/vcenter/namespace-management/clusters/{cluster}/kubeconfig on recent vSphere builds. We try the cluster-scoped path first (deterministic target) and fall back to the user-scoped one.

The response shape is {"kube_config": "<yaml>"}; we return just the YAML string for ergonomics.

saltext.vcf.clients.vcenter_supervisor_kubeconfig.get_kubeconfig(opts, cluster_id, profile=None)[source]

Return the kubeconfig YAML for cluster_id’s Supervisor.

Tries the cluster-scoped endpoint first; falls back to the user-scoped endpoint when the cluster path is not exposed (older vSphere builds).

saltext.vcf.clients.vcenter_supervisor_kubeconfig.get_kubeconfig_for_namespace(opts, namespace_id, profile=None)[source]

Return a namespace-scoped kubeconfig (limits the user to one namespace).