⬇️ Download Kubernetes-Appliance
Credits goes out to William Lam. The code basis for this project is based on the awesome VMware open-source project VMware Event Broker Appliance. I reused the code and stripped it down to the necessary pieces and adjusted it for my needs.
This repository contains the necessary code to build a based Kubernetes Appliance.
The Appliance can be quickly deployed on vSphere for testing, development or learning purposes. Perhaps, it serves as the foundation for your project(s) 😉
CLI Tools:
- VMware ovftool
- Packer
- Run
packer init .
to download the Packer plugin binaries for vSphere.
- Run
- jq
- PowerShell - more optional
Network:
- DHCP enabled
- SSH enabled (port 22)
- No network restrictions between the build system (were
packer
is running on) and the VMware ESXi host - Packer will create an http server serving
http_directory
- Random port used within the range of 8000 and 9000
vSphere
- ESXi 6.7 or greater
- Enable GuestIPHack on the ESXi host before building the appliance:
esxcli system settings advanced set -o /Net/GuestIPHack -i 1
- Clone the repository:
git clone git@github.com:rguske/kubernetes-appliance.git
- Change into the directoy:
cd kubernetes-appliance
- Adjust the
photon-builder.json
file with the appropriate ESXi (build host) data (IP or FQDN, user, password, datastore, network) - Execute the
build.sh
script:./build.sh
Optional: If you like to change the versions for e.g. Kubernetes or Antrea, modify those in the k8s-app-bom.json
The SSH session initiated will be visible in the detail provided when PACKER_LOG=1
environment variable is set within the build.sh
script.
Example: PACKER_LOG=1 packer build -var "K8S_APP_VERSION=${K8S_APP_VERSION_FROM_BOM}" -var-file=photon-builder.json -var-file=photon-version.json photon.json
.
The finished ova
file will be exported to the output-vmware-iso
directory.
I'm a happy user of zsh and oh-my-zsh and therefore, when connecting to the appliance via ssh
, you will use a "pimped" shell environment.
In version v0.3.0, the possibility was added to join an existing Kubernetes-Appliance as an additional node.
- [2024-06-06] Updated versions to Kubernetes 1.29.2, Antrea to 1.15, etc.
- [2022-03-14] Added option to join an existing K8s Appliance Node (v0.3.0)
- [2022-03-10] Added
local-path-provisioner
(v0.2.1) - [2022-03-10] Updated to VMware PhotonOS v4 Rev.2 (v0.2.0)