build 7bbbddf7 | content blog-content@c8490fa · 338 posts | profiles 20 · corpus 267 | 0 skipped | | format
apiVersion: soultec.ch/v1kind: Postmetadata: name: how-to-authenticate-with-the-vsphere-supervisor-api locale: en labels: author: matthias-grasmueck capability/containers: 2.39 vendor/vmware: 0.88 annotations: source: blog-content/posts/en/how-to-authenticate-with-the-vsphere-supervisor-api.md route: /en/insights/how-to-authenticate-with-the-vsphere-supervisor-api/ schema: /nerd/schema/posts.json markdown: /en/insights/how-to-authenticate-with-the-vsphere-supervisor-api.mdspec: title: Authenticate with the vSphere Supervisor API date: 2026-07-29 author: matthias-grasmueck locale: en summary: >- Have you always wondered how to log in directly to the vSphere Supervisor API to communicate directly with the Kubernetes API without having to rely on kubectl-vsphere or vcf-cli command line tool? capabilities: [containers] vendors: [vmware] hero: >- /blog-assets/how-to-authenticate-with-the-vsphere-supervisor-api/hero.webp legacySlug: how-to-authenticate-with-the-vsphere-supervisor-api migrated: 2026-08-24 draft: false sections: - body: | Have you always wondered how to log in directly to the **vSphere Supervisor API** to communicate directly with the Kubernetes API without having to rely on **kubectl-vsphere** or **vcf-cli** command line tool? This short example shows quite simply how you can easily log in to the Supervisor API and, for example, retrieve the vSphere namespaces: ```bash # Get the JSON Web Token (JWT) TOKEN=$(curl -sk -u "USER@DOMAIN" \ -X POST https://SUPERVISOR_FQDN_OR_IP/wcp/login | jq -r '.session_id') # Query all vSphere Namespaces curl -k -H "Authorization: Bearer ${TOKEN}" -X GET https://SUPERVISOR_FQDN_OR_IP/api/v1/namespaces | jq -r '.items[].metadata.name' # Output default kube-node-lease kube-public kube-state-metrics-139ce kube-system svc-argocd svc-argocd-service-3srmt svc-auto-attach-1hnu0 svc-cci-ns-xk907 svc-configuration-tbe79 svc-consumption-operator-63v75 svc-contour-m8mn1 svc-harbor-jpft6 svc-metrics-aggregator-rs4er svc-pais-lyk5h svc-secret-store-6rqli svc-supervisor-management-proxy-l4g5n svc-tkg-gf8p0 svc-tmc-c9 svc-velero-od4zi svc-vks-cluster-manager-service-3873a vmware-system-ako vmware-system-appplatform-operator-system vmware-system-cert-manager vmware-system-csi vmware-system-imageregistry vmware-system-kubeimage vmware-system-logging vmware-system-mgmt-proxy vmware-system-mobility-operator vmware-system-monitoring vmware-system-netop vmware-system-network-operations vmware-system-nsop vmware-system-nsx vmware-system-pinniped vmware-system-supervisor-services vmware-system-supervisor-services-vpc vmware-system-vks-public vmware-system-vmop vmware-system-workload-cli vmware-system-zoneop ``` You can also use this token directly and embed it in a kubeconfig file so that you can use the kubectl CLI as well: ```yaml apiVersion: v1 kind: Config clusters: - cluster: insecure-skip-tls-verify: true server: https://SUPERVISOR_IP:443 name: vcf-mgmt-sn91:SUPERVISOR_IP contexts: - context: cluster: vcf-mgmt-sn91:SUPERVISOR_IP user: vcf-mgmt-sn91:USER@[email protected] name: vcf-mgmt-sn91 current-context: vcf-mgmt-sn91 users: - name: vcf-mgmt-sn91:USER@DOMAIN@SUPERVISOR_IP user: token: REDACTED_JWT ``` Many thanks to **Will Arroyo** ([github.com/warroyo](https://github.com/warroyo/supervisor-login-examples)) for his support and contribution. A big thank you also goes to **Louis Baumann** ([github.com/soultecag](https://github.com/soultecag/vks-k8s-auth)), who provided us with a simple Go client that allows us to log in to a vSphere Supervisor and create a Kubernetes client or a kubeconfig file, either for the Supervisor cluster itself or for one of its VKS guest clusters.status: corpus: 267 alsoLike: - {ref: posts/vvf-9-0-supervisor-mit-foundation-load-balancer, score: 1.00} - {ref: posts/how-to-vsphere-supervisor-services, score: 1.00} - {ref: services/virtualization-container, score: 0.74}
{ "apiVersion": "soultec.ch/v1", "kind": "Post", "metadata": { "name": "how-to-authenticate-with-the-vsphere-supervisor-api", "locale": "en", "labels": { "author": "matthias-grasmueck", "capability/containers": "2.39", "vendor/vmware": "0.88" }, "annotations": { "source": "blog-content/posts/en/how-to-authenticate-with-the-vsphere-supervisor-api.md", "route": "/en/insights/how-to-authenticate-with-the-vsphere-supervisor-api/", "schema": "/nerd/schema/posts.json", "markdown": "/en/insights/how-to-authenticate-with-the-vsphere-supervisor-api.md" } }, "spec": { "title": "Authenticate with the vSphere Supervisor API", "date": "2026-07-29", "author": "matthias-grasmueck", "locale": "en", "summary": "Have you always wondered how to log in directly to the vSphere Supervisor API to communicate directly with the Kubernetes API without having to rely on kubectl-vsphere or vcf-cli command line tool?", "capabilities": [ "containers" ], "vendors": [ "vmware" ], "hero": "/blog-assets/how-to-authenticate-with-the-vsphere-supervisor-api/hero.webp", "legacySlug": "how-to-authenticate-with-the-vsphere-supervisor-api", "migrated": "2026-08-24", "draft": false }, "sections": [ { "body": "Have you always wondered how to log in directly to the **vSphere Supervisor API** to communicate directly with the Kubernetes API without having to rely on **kubectl-vsphere** or **vcf-cli** command line tool?\n\nThis short example shows quite simply how you can easily log in to the Supervisor API and, for example, retrieve the vSphere namespaces:\n\n```bash\n# Get the JSON Web Token (JWT)\nTOKEN=$(curl -sk -u \"USER@DOMAIN\" \\\n-X POST https://SUPERVISOR_FQDN_OR_IP/wcp/login | jq -r '.session_id')\n\n# Query all vSphere Namespaces\ncurl -k -H \"Authorization: Bearer ${TOKEN}\" -X GET https://SUPERVISOR_FQDN_OR_IP/api/v1/namespaces | jq -r '.items[].metadata.name'\n\n# Output\ndefault\nkube-node-lease\nkube-public\nkube-state-metrics-139ce\nkube-system\nsvc-argocd\nsvc-argocd-service-3srmt\nsvc-auto-attach-1hnu0\nsvc-cci-ns-xk907\nsvc-configuration-tbe79\nsvc-consumption-operator-63v75\nsvc-contour-m8mn1\nsvc-harbor-jpft6\nsvc-metrics-aggregator-rs4er\nsvc-pais-lyk5h\nsvc-secret-store-6rqli\nsvc-supervisor-management-proxy-l4g5n\nsvc-tkg-gf8p0\nsvc-tmc-c9\nsvc-velero-od4zi\nsvc-vks-cluster-manager-service-3873a\nvmware-system-ako\nvmware-system-appplatform-operator-system\nvmware-system-cert-manager\nvmware-system-csi\nvmware-system-imageregistry\nvmware-system-kubeimage\nvmware-system-logging\nvmware-system-mgmt-proxy\nvmware-system-mobility-operator\nvmware-system-monitoring\nvmware-system-netop\nvmware-system-network-operations\nvmware-system-nsop\nvmware-system-nsx\nvmware-system-pinniped\nvmware-system-supervisor-services\nvmware-system-supervisor-services-vpc\nvmware-system-vks-public\nvmware-system-vmop\nvmware-system-workload-cli\nvmware-system-zoneop\n```\n\nYou can also use this token directly and embed it in a kubeconfig file so that you can use the kubectl CLI as well:\n\n```yaml\n\napiVersion: v1\nkind: Config\nclusters:\n- cluster:\n insecure-skip-tls-verify: true\n server: https://SUPERVISOR_IP:443\n name: vcf-mgmt-sn91:SUPERVISOR_IP\ncontexts:\n- context:\n cluster: vcf-mgmt-sn91:SUPERVISOR_IP\n user: vcf-mgmt-sn91:USER@[email protected]\n name: vcf-mgmt-sn91\ncurrent-context: vcf-mgmt-sn91\nusers:\n- name: vcf-mgmt-sn91:USER@DOMAIN@SUPERVISOR_IP\n user:\n token: REDACTED_JWT\n```\n\nMany thanks to **Will Arroyo** ([github.com/warroyo](https://github.com/warroyo/supervisor-login-examples)) for his support and contribution.\n\nA big thank you also goes to **Louis Baumann** ([github.com/soultecag](https://github.com/soultecag/vks-k8s-auth)), who provided us with a simple Go client that allows us to log in to a vSphere Supervisor and create a Kubernetes client or a kubeconfig file, either for the Supervisor cluster itself or for one of its VKS guest clusters." } ], "status": { "corpus": 267, "alsoLike": [ { "ref": "posts/vvf-9-0-supervisor-mit-foundation-load-balancer", "score": "1.00" }, { "ref": "posts/how-to-vsphere-supervisor-services", "score": "1.00" }, { "ref": "services/virtualization-container", "score": "0.74" } ] }}
apiVersion = "soultec.ch/v1"kind = "Post"[metadata]name = "how-to-authenticate-with-the-vsphere-supervisor-api"locale = "en"[metadata.labels]author = "matthias-grasmueck""capability/containers" = "2.39""vendor/vmware" = "0.88"[metadata.annotations]source = "blog-content/posts/en/how-to-authenticate-with-the-vsphere-supervisor-api.md"route = "/en/insights/how-to-authenticate-with-the-vsphere-supervisor-api/"schema = "/nerd/schema/posts.json"markdown = "/en/insights/how-to-authenticate-with-the-vsphere-supervisor-api.md"[spec]title = "Authenticate with the vSphere Supervisor API"date = 2026-07-29author = "matthias-grasmueck"locale = "en"summary = "Have you always wondered how to log in directly to the vSphere Supervisor API to communicate directly with the Kubernetes API without having to rely on kubectl-vsphere or vcf-cli command line tool?"capabilities = ["containers"]vendors = ["vmware"]hero = "/blog-assets/how-to-authenticate-with-the-vsphere-supervisor-api/hero.webp"legacySlug = "how-to-authenticate-with-the-vsphere-supervisor-api"migrated = 2026-08-24draft = false[[sections]]body = '''Have you always wondered how to log in directly to the **vSphere Supervisor API** to communicate directly with the Kubernetes API without having to rely on **kubectl-vsphere** or **vcf-cli** command line tool?This short example shows quite simply how you can easily log in to the Supervisor API and, for example, retrieve the vSphere namespaces:```bash# Get the JSON Web Token (JWT)TOKEN=$(curl -sk -u "USER@DOMAIN" \-X POST https://SUPERVISOR_FQDN_OR_IP/wcp/login | jq -r '.session_id')# Query all vSphere Namespacescurl -k -H "Authorization: Bearer ${TOKEN}" -X GET https://SUPERVISOR_FQDN_OR_IP/api/v1/namespaces | jq -r '.items[].metadata.name'# Outputdefaultkube-node-leasekube-publickube-state-metrics-139cekube-systemsvc-argocdsvc-argocd-service-3srmtsvc-auto-attach-1hnu0svc-cci-ns-xk907svc-configuration-tbe79svc-consumption-operator-63v75svc-contour-m8mn1svc-harbor-jpft6svc-metrics-aggregator-rs4ersvc-pais-lyk5hsvc-secret-store-6rqlisvc-supervisor-management-proxy-l4g5nsvc-tkg-gf8p0svc-tmc-c9svc-velero-od4zisvc-vks-cluster-manager-service-3873avmware-system-akovmware-system-appplatform-operator-systemvmware-system-cert-managervmware-system-csivmware-system-imageregistryvmware-system-kubeimagevmware-system-loggingvmware-system-mgmt-proxyvmware-system-mobility-operatorvmware-system-monitoringvmware-system-netopvmware-system-network-operationsvmware-system-nsopvmware-system-nsxvmware-system-pinnipedvmware-system-supervisor-servicesvmware-system-supervisor-services-vpcvmware-system-vks-publicvmware-system-vmopvmware-system-workload-clivmware-system-zoneop```You can also use this token directly and embed it in a kubeconfig file so that you can use the kubectl CLI as well:```yamlapiVersion: v1kind: Configclusters:- cluster: insecure-skip-tls-verify: true server: https://SUPERVISOR_IP:443 name: vcf-mgmt-sn91:SUPERVISOR_IPcontexts:- context: cluster: vcf-mgmt-sn91:SUPERVISOR_IP user: vcf-mgmt-sn91:USER@[email protected] name: vcf-mgmt-sn91current-context: vcf-mgmt-sn91users:- name: vcf-mgmt-sn91:USER@DOMAIN@SUPERVISOR_IP user: token: REDACTED_JWT```Many thanks to **Will Arroyo** ([github.com/warroyo](https://github.com/warroyo/supervisor-login-examples)) for his support and contribution.A big thank you also goes to **Louis Baumann** ([github.com/soultecag](https://github.com/soultecag/vks-k8s-auth)), who provided us with a simple Go client that allows us to log in to a vSphere Supervisor and create a Kubernetes client or a kubeconfig file, either for the Supervisor cluster itself or for one of its VKS guest clusters.'''[status]corpus = 267[[status.alsoLike]]ref = "posts/vvf-9-0-supervisor-mit-foundation-load-balancer"score = "1.00"[[status.alsoLike]]ref = "posts/how-to-vsphere-supervisor-services"score = "1.00"[[status.alsoLike]]ref = "services/virtualization-container"score = "0.74"
<?xml version="1.0" encoding="UTF-8"?><manifest kind="Post"> <apiVersion>soultec.ch/v1</apiVersion> <metadata> <name>how-to-authenticate-with-the-vsphere-supervisor-api</name> <locale>en</locale> <labels> <author>matthias-grasmueck</author> <entry key="capability/containers">2.39</entry> <entry key="vendor/vmware">0.88</entry> </labels> <annotations> <source>blog-content/posts/en/how-to-authenticate-with-the-vsphere-supervisor-api.md</source> <route>/en/insights/how-to-authenticate-with-the-vsphere-supervisor-api/</route> <schema>/nerd/schema/posts.json</schema> <markdown>/en/insights/how-to-authenticate-with-the-vsphere-supervisor-api.md</markdown> </annotations> </metadata> <spec> <title>Authenticate with the vSphere Supervisor API</title> <date>2026-07-29</date> <author>matthias-grasmueck</author> <locale>en</locale> <summary>Have you always wondered how to log in directly to the vSphere Supervisor API to communicate directly with the Kubernetes API without having to rely on kubectl-vsphere or vcf-cli command line tool?</summary> <capabilities> <item>containers</item> </capabilities> <vendors> <item>vmware</item> </vendors> <hero>/blog-assets/how-to-authenticate-with-the-vsphere-supervisor-api/hero.webp</hero> <legacySlug>how-to-authenticate-with-the-vsphere-supervisor-api</legacySlug> <migrated>2026-08-24</migrated> <draft>false</draft> </spec> <sections> <section> <body>Have you always wondered how to log in directly to the **vSphere Supervisor API** to communicate directly with the Kubernetes API without having to rely on **kubectl-vsphere** or **vcf-cli** command line tool?This short example shows quite simply how you can easily log in to the Supervisor API and, for example, retrieve the vSphere namespaces:```bash# Get the JSON Web Token (JWT)TOKEN=$(curl -sk -u "USER@DOMAIN" \-X POST https://SUPERVISOR_FQDN_OR_IP/wcp/login | jq -r '.session_id')# Query all vSphere Namespacescurl -k -H "Authorization: Bearer ${TOKEN}" -X GET https://SUPERVISOR_FQDN_OR_IP/api/v1/namespaces | jq -r '.items[].metadata.name'# Outputdefaultkube-node-leasekube-publickube-state-metrics-139cekube-systemsvc-argocdsvc-argocd-service-3srmtsvc-auto-attach-1hnu0svc-cci-ns-xk907svc-configuration-tbe79svc-consumption-operator-63v75svc-contour-m8mn1svc-harbor-jpft6svc-metrics-aggregator-rs4ersvc-pais-lyk5hsvc-secret-store-6rqlisvc-supervisor-management-proxy-l4g5nsvc-tkg-gf8p0svc-tmc-c9svc-velero-od4zisvc-vks-cluster-manager-service-3873avmware-system-akovmware-system-appplatform-operator-systemvmware-system-cert-managervmware-system-csivmware-system-imageregistryvmware-system-kubeimagevmware-system-loggingvmware-system-mgmt-proxyvmware-system-mobility-operatorvmware-system-monitoringvmware-system-netopvmware-system-network-operationsvmware-system-nsopvmware-system-nsxvmware-system-pinnipedvmware-system-supervisor-servicesvmware-system-supervisor-services-vpcvmware-system-vks-publicvmware-system-vmopvmware-system-workload-clivmware-system-zoneop```You can also use this token directly and embed it in a kubeconfig file so that you can use the kubectl CLI as well:```yamlapiVersion: v1kind: Configclusters:- cluster: insecure-skip-tls-verify: true server: https://SUPERVISOR_IP:443 name: vcf-mgmt-sn91:SUPERVISOR_IPcontexts:- context: cluster: vcf-mgmt-sn91:SUPERVISOR_IP user: vcf-mgmt-sn91:USER@[email protected] name: vcf-mgmt-sn91current-context: vcf-mgmt-sn91users:- name: vcf-mgmt-sn91:USER@DOMAIN@SUPERVISOR_IP user: token: REDACTED_JWT```Many thanks to **Will Arroyo** ([github.com/warroyo](https://github.com/warroyo/supervisor-login-examples)) for his support and contribution.A big thank you also goes to **Louis Baumann** ([github.com/soultecag](https://github.com/soultecag/vks-k8s-auth)), who provided us with a simple Go client that allows us to log in to a vSphere Supervisor and create a Kubernetes client or a kubeconfig file, either for the Supervisor cluster itself or for one of its VKS guest clusters. </body> </section> </sections> <status> <corpus>267</corpus> <alsoLike> <item> <ref>posts/vvf-9-0-supervisor-mit-foundation-load-balancer</ref> <score>1.00</score> </item> <item> <ref>posts/how-to-vsphere-supervisor-services</ref> <score>1.00</score> </item> <item> <ref>services/virtualization-container</ref> <score>0.74</score> </item> </alsoLike> </status></manifest>
Post · 2026-07-29

Authenticate with the vSphere Supervisor API

Have you always wondered how to log in directly to the vSphere Supervisor API to communicate directly with the Kubernetes API without having to rely on kubectl-vsphere or vcf-cli command line tool?

2026-07-29Date
Matthias GrasmückAuthor
1Min read
Topics Containers 2.39
Vendors VMware 0.88

Have you always wondered how to log in directly to the vSphere Supervisor API to communicate directly with the Kubernetes API without having to rely on kubectl-vsphere or vcf-cli command line tool?

This short example shows quite simply how you can easily log in to the Supervisor API and, for example, retrieve the vSphere namespaces:

# Get the JSON Web Token (JWT)
TOKEN=$(curl -sk -u "USER@DOMAIN" \
-X POST https://SUPERVISOR_FQDN_OR_IP/wcp/login | jq -r '.session_id')

# Query all vSphere Namespaces
curl -k -H "Authorization: Bearer ${TOKEN}" -X GET https://SUPERVISOR_FQDN_OR_IP/api/v1/namespaces | jq -r '.items[].metadata.name'

# Output
default
kube-node-lease
kube-public
kube-state-metrics-139ce
kube-system
svc-argocd
svc-argocd-service-3srmt
svc-auto-attach-1hnu0
svc-cci-ns-xk907
svc-configuration-tbe79
svc-consumption-operator-63v75
svc-contour-m8mn1
svc-harbor-jpft6
svc-metrics-aggregator-rs4er
svc-pais-lyk5h
svc-secret-store-6rqli
svc-supervisor-management-proxy-l4g5n
svc-tkg-gf8p0
svc-tmc-c9
svc-velero-od4zi
svc-vks-cluster-manager-service-3873a
vmware-system-ako
vmware-system-appplatform-operator-system
vmware-system-cert-manager
vmware-system-csi
vmware-system-imageregistry
vmware-system-kubeimage
vmware-system-logging
vmware-system-mgmt-proxy
vmware-system-mobility-operator
vmware-system-monitoring
vmware-system-netop
vmware-system-network-operations
vmware-system-nsop
vmware-system-nsx
vmware-system-pinniped
vmware-system-supervisor-services
vmware-system-supervisor-services-vpc
vmware-system-vks-public
vmware-system-vmop
vmware-system-workload-cli
vmware-system-zoneop

You can also use this token directly and embed it in a kubeconfig file so that you can use the kubectl CLI as well:


apiVersion: v1
kind: Config
clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: https://SUPERVISOR_IP:443
  name: vcf-mgmt-sn91:SUPERVISOR_IP
contexts:
- context:
    cluster: vcf-mgmt-sn91:SUPERVISOR_IP
    user: vcf-mgmt-sn91:USER@[email protected]
  name: vcf-mgmt-sn91
current-context: vcf-mgmt-sn91
users:
- name: vcf-mgmt-sn91:USER@DOMAIN@SUPERVISOR_IP
  user:
    token: REDACTED_JWT

Many thanks to Will Arroyo (github.com/warroyo) for his support and contribution.

A big thank you also goes to Louis Baumann (github.com/soultecag), who provided us with a simple Go client that allows us to log in to a vSphere Supervisor and create a Kubernetes client or a kubeconfig file, either for the Supervisor cluster itself or for one of its VKS guest clusters.

You might also like