Deploying a Kubernetes cluster on vSphere
Kubernetes provides portable orchestration, while vSphere adds mature virtualisation, storage and operational controls. The platform suits organisations already invested in VMware, but success depends on treating VMs, networking and persistent storage as one system rather than bolting containers onto existing workloads.
This guide focuses on upstream kubeadm with Linux VMs for control-plane and worker nodes. The principles also suit evaluations of Tanzu Kubernetes Grid, although that product has its own lifecycle, configuration flow and compatibility matrix.
For Australian teams, geography shapes the architecture. Sydney, Melbourne, Brisbane and Perth data centres introduce different latency and failover paths, while Australian Eastern Standard Time and daylight-saving changes make clock synchronisation essential. Privacy expectations and hybrid links to Australian cloud regions also belong in the design.
Prepare the vSphere foundation
Start with vCenter Server and supported vSphere releases, then check the vSphere Container Storage Interface (CSI) compatibility matrix for the Kubernetes version. Use an Ubuntu LTS guest, a hardened template and a dedicated service account. Record datastore, host cluster, VLAN, DNS and NTP settings for repeatable builds.
Create these platform prerequisites before running kubeadm:
- vCenter connectivity and a datastore with tested free-space thresholds
- Reserved addresses for nodes, the API endpoint and future growth
- DNS and NTP services reachable from every VM
Choose a sizing pattern that matches the workload:
- Development: one control plane, two or three workers and no production SLA
- Testing: one control plane, three to five workers and single-replica applications
- Production: three control-plane VMs across ESXi hosts, with workers across failure domains
- Stateful services: replicated databases and deliberate storage headroom
Production teams should use three control-plane VMs with stacked etcd across separate hosts. A single control plane is acceptable for a lab but creates an outage point. Australian imports add another administrative edge: physical lab servers or appliances normally need an ABN and correct GST and customs declarations with a broker, whereas electronic VM templates do not.
Plan reliable cluster networking
Assign static addresses to each VM and reserve the kubeadm API endpoint. Separate management, workload and storage networks where practical. Pod, service and ingress CIDRs must not overlap with corporate VPNs, data-centre networks or vSphere port groups, because overlap causes difficult routing faults.
DNS matters as much as addressing. Create forward and reverse records for the API server and nodes, then use the corporate resolver. Service discovery should target the virtual IP rather than one control-plane VM, allowing the endpoint to move during failover.
Install a CNI such as Calico or Cilium after initialising the control plane. For clusters spanning Australian sites, test latency, packet loss and asymmetric routing instead of assuming a stretched layer-2 network. Keep latency-sensitive storage near its workloads even when API endpoints are distributed.
Configure Linux nodes for Kubernetes
Prepare every Ubuntu VM with a supported container runtime, disable swap, enable br_netfilter and verify the required filesystem modules. An Ansible role can apply cgroup and networking settings consistently and confirm that kubelet starts cleanly.
Pin kubeadm, kubelet and kubectl to matching patch releases, then run preflight checks. If an image changes, rebuild it instead of manually repairing several nodes, because small differences can break later upgrades.
PowerCLI can generate VM names, collect reports and check datastore usage, while Terraform can codify ordinary VM resources. Manage Kubernetes configuration separately with Ansible, GitOps or version-controlled kubeadm files, and keep credentials outside Git.
Deploy vSphere cloud storage
The vSphere CSI driver supplies native volume handling but is separate from kubeadm. Install components matched to the Kubernetes release, confirm Container Storage Service or the required metadata service is healthy, and create a StorageClass using a compatible vSphere storage policy. At the infrastructure layer, custom vCenter roles can limit who manages CSI components, storage policies and VM access.
Use WaitForFirstConsumer where topology-aware provisioning matters. Tag accessible datastores and policies by zone, then confirm that CSI controller and node pods are Ready. Test a PersistentVolumeClaim, not just the StorageClass object, because binding, filesystem and mount faults appear only when a pod consumes the claim.
For Australian regulated workloads, decide where datastore copies and backups physically reside before applications start. Privacy Act and Notifiable Data Breaches obligations can influence data placement, although compliance teams should determine exact requirements. Hybrid deployments can retain sensitive state in Australia while using Sydney or Melbourne cloud regions for burst capacity.
Install and validate with kubeadm
Create a kubeadm configuration that advertises the control-plane endpoint and defines the pod and service CIDRs:
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
controlPlaneEndpoint: 10.20.30.40:6443
networking:
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/12
Run kubeadm init with the file, install the selected CNI and store the generated worker join command in a secret manager. Add workers with kubeadm join, then confirm that the nodes and system pods are healthy:
kubectl get nodes -o wide
kubectl get pods -A
kubectl get storageclass
Deploy a small application with a PVC and watch it reach Running before declaring success. Check kubectl describe for scheduling and mount events, inspect vSphere task history for clone or disk operations, and exercise one node drain. A cluster can return healthy while its storage, ingress path or failover behaviour remains untested.
Secure and operate the cluster
Use least privilege for Kubernetes and vSphere. Bind RBAC groups to named operational roles, rotate certificates and keep etcd encrypted. Restrict console access, storage-policy changes and VM creation to the teams that need them, and review permissions when responsibilities change.
Monitor etcd health, API latency, node readiness, CSI capacity and datastore free space. Back up etcd and application data, test restoration, and upgrade one supported minor release at a time with a rollback plan. In the Australian market, internal platform skills are often combined with VMware support from ANZ resellers or managed-service partners, so ownership and escalation paths need explicit agreement.
Turn the design into a repeatable runbook, then explore free PowerCLI tools to accelerate inventory, reporting and routine vSphere tasks. Build a small lab cluster, prove storage and failure recovery, and use the result as the baseline for production.