Most VKS guides stop at “cluster created”. A production build has more to it: VLANs that must be proven before vSphere touches them, a private registry the cluster must trust from its first boot, and shared storage that pods can actually write to.
This post walks through a production build I did on VCF 9.1 with the Foundation Load Balancer, Harbor, a 7-node VKS cluster, NFS for ReadWriteMany volumes, and Istio, Contour and Headlamp on top. The commands that matter are all here, in the order you need them.
All names and IP addresses are examples from a made-up network plan, and the terminal screenshots were re-typed with those example values.
What is in this post
- Before you start: what to have ready, including the full list of URLs to allow
- Step 0: prove the network · Step 1: the jump server · Step 2: the Supervisor and load balancer
- Step 3: Harbor · Step 4: the vSphere Namespace · Step 5: the cluster · Step 6: access
- Step 7: ReadWriteMany storage · Step 8: Istio and Contour · Step 9: Headlamp · Final checks
What we are building
| Component | Version / size |
|---|---|
| VMware Cloud Foundation | 9.1 |
| Supervisor | VDS networking, control plane HA, size Medium |
| Load balancer | Foundation Load Balancer, One-Arm, Medium, 2 VMs |
| vSphere Kubernetes Service | 3.6, ClusterClass builtin-generic-v3.6.0 |
| Kubernetes release | v1.35.5 |
| Registry | Harbor 2.15.2 as a Supervisor Service |
| Cluster | 3 control-plane nodes (12 vCPU / 48 GB) + 4 workers (24 vCPU / 64 GB, 500 GB container disk) |
| Shared storage | NFSv4.1 export with csi-driver-nfs (a Dell PowerStore in my case; any NFSv4 server works) |
| Add-ons | cert-manager, Istio, Contour (Gateway API CRDs ship with the VKr) |
| Console | Headlamp |
All work is done from a Windows jump server with the VCF CLI, kubectl, Helm and crane. No Docker is needed anywhere. Every third-party image is copied into Harbor first, so the cluster pulls from one registry you control.
Example network plan
| VLAN | Subnet | Used for |
|---|---|---|
| 100 | 10.10.0.0/24 | Management: vCenter, ESXi, jump server, Supervisor management IPs (10.10.0.24 to .28), FLB management IPs |
| 200 | 10.20.0.0/24 | Supervisor workload network, Harbor, FLB data NICs (.200 to .209) and VIPs (.210 to .239) |
| 300 | 10.30.0.0/26 | VKS cluster nodes (.10 to .50) and the NFS server interface (.60) |
Inside the cluster: pod CIDR 10.244.0.0/20 (room for 16 nodes) and service CIDR 10.100.0.0/24. Neither can be changed after the cluster exists, so check they don’t overlap anything the pods need to reach.
Before you start
Have these in place before Step 2:
- Three VLANs trunked on every host uplink, with gateways, routes in both directions, and NAT for internet egress.
- DNS records for the Supervisor API and for Harbor, created once their VIPs are known (the first VIP from the range goes to the Supervisor).
- Internal firewall rules: load balancer data NICs → nodes (TCP 6443, 80, 443, 30000 to 32767); nodes → Harbor and Supervisor (443, 6443); jump server → VIPs and nodes (443, 6443, 22).
- An NFS server with an interface on the node VLAN and NFSv4 enabled.
administrator@vsphere.localfor every vCenter step, and a Broadcom Support Portal login for the downloads.- A Windows jump server with internet access, for the CLI, Helm and crane.
Internet allow list
This is the complete list of what had to be reachable, by source. Allow by FQDN or SNI, never by IP: every one of these is CDN-backed and the addresses rotate. If the firewall does TLS inspection, exclude these names or make the Supervisor, Harbor and the nodes trust the inspection CA. The CDN names are the ones that get missed: a rule for registry.k8s.io without *.pkg.dev gives you pulls that connect and then hang. To find a CDN host, run curl.exe -sI https://registry.k8s.io/v2/pause/manifests/3.10 and read the location: header.
| From | Allow (TCP 443 unless noted) | Why |
|---|---|---|
| vCenter | wp-content.broadcom.com, wp-content.broadcom.com.cdn.cloudflare.net | Kubernetes release content library |
| Supervisor control plane and Supervisor workload network | projects.packages.broadcom.com, packages.broadcom.com, vcf.packages.broadcom.com, plus the CDN behind them: broadcom.jfrog.io, *.jfrog.io, *.elb.us-west-2.amazonaws.com, jfrog-prod-usw2-shared-oregon-main.s3.amazonaws.com | Supervisor Services including Harbor’s own images, the VKS service, add-on and package bundles |
| VKS cluster nodes | The same Broadcom names as above | Add-on images; everything else comes from Harbor |
| Jump server | support.broadcom.com, github.com, objects.githubusercontent.com, raw.githubusercontent.com, get.helm.sh, kubernetes-sigs.github.io | VCF CLI, Helm, crane and the Helm charts |
| Jump server | registry.k8s.io, *.pkg.dev, prod-registry-k8s-io-*.s3.dualstack.*.amazonaws.com | Copying the NFS CSI driver and test images into Harbor with crane |
| Jump server | ghcr.io, pkg-containers.githubusercontent.com | Copying the Headlamp image into Harbor |
| Jump server | ocsp.digicert.com, crl3.digicert.com, crl4.digicert.com on TCP 80 | Code-signing revocation checks; without them the CLI starts very slowly |
| Harbor (only if you use its proxy cache) | Docker Hub: registry-1.docker.io, auth.docker.io, production.cloudflare.docker.com · GHCR: ghcr.io, pkg-containers.githubusercontent.com · Quay: quay.io, cdn01.quay.io to cdn03.quay.io · registry.k8s.io with *.pkg.dev · your <name>.azurecr.io | Pulling upstream images through Harbor instead of copying them by hand, and the Trivy vulnerability database |
Step 0: prove the network before vSphere uses it
Before you hand a VLAN to the Supervisor, put a small Linux VM on its port group, once on every host, and check:
- the gateway answers,
- a VM on another VLAN answers, and the reply comes back,
curl -I https://projects.packages.broadcom.comreturns an HTTP status line.
Test every host, not just one: a VLAN missing from one host’s uplink trunk only breaks traffic between VMs on different hosts, which is hard to spot later. While the test VM is up, also check the allow list above from each VLAN that needs it.
Step 1: prepare the jump server
Download the VCF CLI for Windows and its plugin bundle from the Broadcom Support Portal. Unblock the downloaded files first, or Windows scans every CLI call and the tools run very slowly:
Get-ChildItem C:\tools -Recurse | Unblock-Filevcf plugin install all --local-source C:\tools\vcf-plugin-bundle
Trust the vCenter root CA in an administrator PowerShell:
curl.exe -k -o C:\temp\vc-certs.zip https://vcsa01.corp.example.com/certs/download.zipExpand-Archive C:\temp\vc-certs.zip -DestinationPath C:\temp\vc-certs -ForceGet-ChildItem C:\temp\vc-certs\certs\win\*.crt | ForEach-Object { certutil -addstore -f Root $_.FullName }
Install Helm and crane (Google’s registry copy tool, which copies images between registries without Docker):
curl.exe -L -o C:\temp\crane.tar.gz https://github.com/google/go-containerregistry/releases/download/v0.20.3/go-containerregistry_Windows_x86_64.tar.gztar -xzf C:\temp\crane.tar.gz -C C:\tools crane.exe
Step 2: enable the Supervisor with the Foundation Load Balancer
In the vSphere Client: Supervisor Management → Get Started, VDS networking. The values that matter:
| Wizard page | Value |
|---|---|
| Load balancer | Foundation Load Balancer, One-Arm, Medium, 2 VMs |
| LB management network | Management port group, 10.10.0.29 to 10.10.0.32 (a couple of spare IPs beyond the two VMs) |
| LB virtual server network | Workload port group; data NIC IPs 10.20.0.200 to .209; VIP range 10.20.0.210 to .239 (the two ranges must not overlap) |
| Management network | Starting IP 10.10.0.24 (uses 5 in a row) |
| Workload network | 10.20.0.40 to .99, service CIDR 10.96.0.0/23 |
| Control plane size | Medium (it can grow later, never shrink) |
How the Foundation Load Balancer uses its IPs
The wizard asks for three ranges, and each has one job. Management IPs (one per LB VM) are how the Supervisor configures the load balancer. Data NIC IPs (one per LB VM) are the source address of all traffic the load balancer sends to backends, including health checks. The VIP range is handed out on demand: every Service of type LoadBalancer, on the Supervisor or inside a cluster, takes the next free VIP and gives it back when deleted. Size it for one Supervisor API, one per Supervisor Service, one per cluster and one per app ingress, plus headroom.
At run time, clients only ever connect to a VIP. The active LB VM forwards the connection to a control-plane node on 6443 (Kubernetes API) or to a worker NodePort (apps), and rewrites the source to its data NIC IP, so replies always come back through it. Two consequences: inbound firewall rules only need LB data NICs → nodes, and pod logs show the data NIC IP as the client. In the other direction, traffic leaving a pod is NATed to the node’s IP, so outbound firewall rules use the node subnet as the source, never the pod or service CIDRs.
When the Supervisor is Running, the first VIP (.210) is the API. Log in:
vcf context create sup01 --endpoint 10.20.0.210 --username administrator@vsphere.local --type k8svcf context use sup01
Step 3: Harbor as a Supervisor Service
Without a VCF Operations software depot, use Harbor’s legacy Supervisor Service manifest. Register it under Supervisor Management → Services, then install it with a data-values file. The keys that matter:
hostname: harbor.corp.example.comenableNginxLoadBalancer: trueenableContourHttpProxy: falseharborAdminPassword: "<strong password>"secretKey: "<exactly 16 characters>"core: xsrfKey: "<exactly 32 characters>"
Harbor runs as vSphere Pods on the Supervisor workload network, so that subnet needs internet egress and a working return route for the image pulls. Once the pods are Running, save Harbor’s CA; every cluster needs it to trust the registry:
$b64 = kubectl get secret harbor-tls -n <svc-harbor-namespace> -o jsonpath="{.data.ca\.crt}"[IO.File]::WriteAllBytes("C:\temp\harbor-ca.crt", [Convert]::FromBase64String($b64))certutil -addstore -f Root C:\temp\harbor-ca.crt
In the Harbor UI, create a Public project called k8s for the third-party images that come later, and log crane in: crane auth login harbor.corp.example.com -u admin --password-stdin.
Step 4: the vSphere Namespace
- Add a second workload network for the node VLAN (10.30.0.10 to .50) under Supervisor → Configure → Network → Workload Network.
- Create a subscribed content library for Kubernetes releases (
https://wp-content.broadcom.com/v2/latest/lib.json) and synchronize the version you will use, so it is stored locally. - Create custom VM classes:
cp-12c-48g(12 vCPU / 48 GB) andworker-24c-64g(24 vCPU / 64 GB). - Create the namespace
appson the node network (it can only be chosen at creation), then add the storage policy, the VM classes and the content library.
Step 5: the cluster
First, the Harbor trust secret. Its name must be <cluster>-user-trusted-ca-secret, and it must exist before the cluster is applied. Deleting a cluster removes its secret too, so recreate it before any re-apply:
$b1 = [Convert]::ToBase64String([IO.File]::ReadAllBytes("C:\temp\harbor-ca.crt"))kubectl create secret generic prod-vks01-user-trusted-ca-secret -n apps --from-literal=harbor-ca=$b1
Then the cluster. On VKS 3.x, trust goes under the osConfiguration variable; the old top-level trust variable is rejected:
apiVersion: cluster.x-k8s.io/v1beta1kind: Clustermetadata: name: prod-vks01 namespace: appsspec: clusterNetwork: pods: cidrBlocks: ["10.244.0.0/20"] services: cidrBlocks: ["10.100.0.0/24"] serviceDomain: cluster.local topology: class: builtin-generic-v3.6.0 classNamespace: vmware-system-vks-public version: v1.35.5---vmware.1-vkr.1 controlPlane: replicas: 3 workers: machineDeployments: - class: node-pool name: np1 replicas: 4 variables: overrides: - name: vmClass value: worker-24c-64g - name: volumes value: - name: containerd mountPath: /var/lib/containerd capacity: 500Gi storageClass: vks-storage-policy variables: - name: vmClass value: cp-12c-48g - name: storageClass value: vks-storage-policy - name: osConfiguration value: trust: additionalTrustedCAs: - caCert: secretRef: name: prod-vks01-user-trusted-ca-secret key: harbor-ca
The volumes override gives each worker a dedicated 500 GB disk for container images, so large images never fill the root disk.
kubectl apply -f C:\temp\prod-vks01.yamlkubectl get cluster,machines -n apps
Two minutes after the apply, check that the cluster’s endpoint matches its load balancer service: kubectl get cluster prod-vks01 -n apps -o jsonpath='{.spec.controlPlaneEndpoint.host}' must equal the EXTERNAL-IP of kubectl get svc prod-vks01 -n apps. If you ever rebuild, give the new cluster a name that has not been used in that namespace before.
In about 20 minutes the cluster shows AVAILABLE True. Log in:
vcf context create prod-vks01 --endpoint 10.20.0.210 --username administrator@vsphere.local --workload-cluster-name prod-vks01 --workload-cluster-namespace appsvcf context use prod-vks01:prod-vks01kubectl get nodes -o wide
Step 6: access without handing out kubeconfigs
Everyone logs in with their own directory account through the vSphere Namespace, and the namespace role decides what they get. Grant the roles from the namespace’s Summary → Permissions card as administrator@vsphere.local:
| Namespace role | Inside the cluster | Give to |
|---|---|---|
| Can view | Login only; rights come from RoleBindings you add | Application teams |
| Can edit | cluster-admin, created automatically | Platform admins |
For each application, create its namespace, set a Pod Security level, and bind the team’s group to the built-in edit role there. VKS clusters enforce restricted by default, which refuses most images that run as root; baseline suits most applications:
kubectl create ns app1kubectl label ns app1 pod-security.kubernetes.io/enforce=baselinekubectl create rolebinding team-edit -n app1 --clusterrole=edit --group="sso:app-team@corp.example.com"
Step 7: ReadWriteMany storage on NFS
An NFS datastore mounted on ESXi gives pods only ReadWriteOnce volumes. For volumes shared across pods, the cluster needs an NFS CSI driver talking to the NFS server directly. Putting the server’s interface on the node VLAN keeps NFS off routers and firewalls entirely.
On the NFS server, create the export /k8s-rwx with NFSv4 enabled, and give host access to the whole node subnet (10.30.0.0/26) as read/write with root allowed (no root squash). The subnet rather than node IPs, because nodes are replaced on every upgrade; root, because the driver creates a folder per volume as root.
Test a write from a worker before installing anything. The mount succeeds even when root is squashed; only the write tells you the export is right:
sudo mkdir -p /mnt/t && sudo mount -t nfs -o vers=4.1 10.30.0.60:/k8s-rwx /mnt/tsudo touch /mnt/t/test && sudo chown 1000:1000 /mnt/t/test && ls -ln /mnt/tsudo rm /mnt/t/test && sudo umount /mnt/t
Copy the driver images into Harbor with crane (chart 4.13.6 shown):
$h = "harbor.corp.example.com/k8s/sig-storage"crane copy --platform linux/amd64 registry.k8s.io/sig-storage/nfsplugin:v4.13.6 $h/nfsplugin:v4.13.6crane copy --platform linux/amd64 registry.k8s.io/sig-storage/csi-provisioner:v6.3.0 $h/csi-provisioner:v6.3.0crane copy --platform linux/amd64 registry.k8s.io/sig-storage/csi-resizer:v2.2.1 $h/csi-resizer:v2.2.1crane copy --platform linux/amd64 registry.k8s.io/sig-storage/csi-snapshotter:v8.6.0 $h/csi-snapshotter:v8.6.0crane copy --platform linux/amd64 registry.k8s.io/sig-storage/livenessprobe:v2.19.0 $h/livenessprobe:v2.19.0crane copy --platform linux/amd64 registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.17.0 $h/csi-node-driver-registrar:v2.17.0crane copy --platform linux/amd64 registry.k8s.io/sig-storage/snapshot-controller:v8.6.0 $h/snapshot-controller:v8.6.0
Install the chart pointing at Harbor:
helm repo add csi-driver-nfs https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/chartshelm install csi-driver-nfs csi-driver-nfs/csi-driver-nfs -n kube-system --version 4.13.6 --set image.baseRepo=harbor.corp.example.com/k8s --set image.nfs.repository=harbor.corp.example.com/k8s/sig-storage/nfsplugin
Then the StorageClass. Retain keeps the data folder on the NFS server when a volume is deleted, which is what you want in production:
apiVersion: storage.k8s.io/v1kind: StorageClassmetadata: name: nfs-rwxprovisioner: nfs.csi.k8s.ioparameters: server: 10.30.0.60 share: /k8s-rwxreclaimPolicy: RetainvolumeBindingMode: ImmediateallowVolumeExpansion: truemountOptions: - nfsvers=4.1 - hard
Prove it with a two-replica Deployment, forced onto different nodes with pod anti-affinity, both appending to the same file on one ReadWriteMany PVC. If tail shows both pod names, RWX works across nodes. Note that this driver does not enforce a size per volume; everything shares the export’s capacity.
Step 8: Istio, Contour and Gateway API
VKS add-ons are installed from the Supervisor namespace context, not from inside the cluster:
vcf context use sup01:appsvcf addon install create cert-manager --cluster-name prod-vks01 -yvcf addon install create istio --cluster-name prod-vks01 -yvcf addon install list --cluster-name prod-vks01
There is no need for the gateway-api add-on on VKr v1.35.5: the Gateway API CRDs ship with the Kubernetes release, and Istio’s istio GatewayClass is accepted straight away. Check with kubectl get crd | Select-String gateway.networking before installing it on other releases.
Contour’s Envoy defaults to NodePort. To get a LoadBalancer VIP, pass a values file, which requires an explicit version:
envoy: service: type: LoadBalancer
vcf addon available list contourvcf addon install create contour --cluster-name prod-vks01 --version <version> -f C:\temp\contour-values.yaml -y
A fresh Envoy resets connections until at least one Ingress or HTTPProxy exists, so a connection reset on a new ingress VIP is expected. To test Istio end to end, apply a Gateway (class istio, port 80), a small web Deployment and Service, and an HTTPRoute pointing at it. Istio creates the gateway pod and its LoadBalancer service from the Gateway itself; when the Gateway shows PROGRAMMED True, curl its address.
Step 9: Headlamp as the cluster console
Headlamp gives the team a browser view of workloads, logs and events without handing out kubeconfigs. Same pattern as the NFS driver: copy the image into Harbor, install with Helm, expose on a VIP. The chart already creates a ClusterRoleBinding called headlamp-admin, so the login account’s binding needs a different name:
crane copy --platform linux/amd64 ghcr.io/headlamp-k8s/headlamp:v0.46.0 harbor.corp.example.com/k8s/headlamp:v0.46.0helm repo add headlamp https://kubernetes-sigs.github.io/headlamp/helm install headlamp headlamp/headlamp -n headlamp --create-namespace --version 0.46.0 --set image.registry=harbor.corp.example.com --set image.repository=k8s/headlamp --set image.tag=v0.46.0 --set service.type=LoadBalancerkubectl create sa headlamp-login -n headlampkubectl create clusterrolebinding headlamp-login --clusterrole=cluster-admin --serviceaccount=headlamp:headlamp-loginkubectl create token headlamp-login -n headlamp --duration=24h
Open http://<EXTERNAL-IP>, choose Token, and paste it. For a production URL, put it behind Contour with a hostname and a certificate, and switch the Service back to ClusterIP.
Final checks
Before handing the platform to application teams, confirm all of these:
kubectl get cluster -n appsshows AVAILABLE True, and 7 nodes are Ready on the expected IPs.- The cluster’s
controlPlaneEndpointequals the EXTERNAL-IP of its Service on the Supervisor. - The two-pod RWX test shows both pod names in the shared file.
vcf addon install listshows cert-manager, Istio and Contour READY, and Contour’senvoyService has a VIP.- The Istio gateway test returns the test page from its VIP.
- A platform admin logs in with a directory account and
kubectl auth can-i '*' '*' -Aprints yes; an application user can deploy in their namespace only. - Test namespaces are deleted and their VIPs released. All LoadBalancer Services share the same 30-address pool.
If you are building something similar and run into something this post doesn’t cover, let me know in the comments.
Leave a Reply