Install konfigadm¶
wget -nv -nc -O konfigadm \
https://github.com/flanksource/konfigadm/releases/latest/download/konfigadm && \
chmod +x konfigadm && \
mv konfigadm /usr/local/bin/konfigadm
wget -nv -nc -O konfigadm \
https://github.com/flanksource/konfigadm/releases/latest/download/konfigadm_osx && \
chmod +x konfigadm && \
mv konfigadm /usr/local/bin/konfigadm
Create konfigadm.yml¶
konfigadm.yml
kubernetes:
version: v1.18.15
commands:
- systemctl start docker
- kubeadm config images pull --kubernetes-version v1.18.15
- apt remove -y unattended-upgrades
- apt-get update
- apt-get upgrade -y
container_runtime:
type: docker
cleanup: true
Build image¶
konfigadm images build -v --image ubuntu1804 \
--resize +15g \
--output-filename kube-v1.18.15.img \
konfigadm.yml
Upload image¶
(Note konfigadm expects $GOVC env vars to be present)
export NAME=k8s-vv1.18.15
echo Pushing image to $GOVC_FQDN/$GOVC_CLUSTER/$GOVC_DATASTORE, net=$GOVC_NETWORK
konfigadm images upload ova -vv --image kube-v1.18.15.img --name $NAME
Configure template¶
govc device.serial.add -vm $NAME -
govc vm.change -vm $NAME -nested-hv-enabled=true -vpmc-enabled=true
govc vm.upgrade -version=15 -vm $NAME