Created
December 3, 2021 13:55
-
-
Save richardcase/58c5e55c773895a47188a3737a642eb7 to your computer and use it in GitHub Desktop.
Dev CAPMVM Manifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: cluster.x-k8s.io/v1beta1 | |
kind: Cluster | |
metadata: | |
name: "mvm-test" | |
spec: | |
clusterNetwork: | |
pods: | |
cidrBlocks: | |
- 192.168.0.0/16 | |
services: | |
cidrBlocks: | |
- 172.26.0.0/16 | |
infrastructureRef: | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | |
kind: MicrovmCluster | |
name: "mvm-test" | |
controlPlaneRef: | |
kind: KubeadmControlPlane | |
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | |
name: "mvm-test-control-plane" | |
--- | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | |
kind: MicrovmCluster | |
metadata: | |
name: "mvm-test" | |
spec: | |
controlPlaneEndpoint: | |
host: "192.168.8.15" | |
port: 6443 | |
--- | |
kind: KubeadmControlPlane | |
apiVersion: controlplane.cluster.x-k8s.io/v1beta1 | |
metadata: | |
name: "mvm-test-control-plane" | |
spec: | |
replicas: 1 | |
version: "v1.20.0" | |
machineTemplate: | |
infrastructureRef: | |
kind: MicrovmMachineTemplate | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | |
name: "mvm-test-control-plane" | |
kubeadmConfigSpec: | |
initConfiguration: | |
nodeRegistration: | |
kubeletExtraArgs: | |
provider-id: "PROVIDER_ID" | |
clusterConfiguration: {} | |
joinConfiguration: | |
nodeRegistration: | |
kubeletExtraArgs: | |
provider-id: "PROVIDER_ID" | |
preKubeadmCommands: | |
- mkdir -p /etc/kubernetes/manifests && ctr images pull ghcr.io/kube-vip/kube-vip:v0.4.0 && ctr run --rm --net-host ghcr.io/kube-vip/kube-vip:v0.4.0 vip /kube-vip manifest pod --arp --interface $(ip -4 -j route list default | jq -r .[0].dev) --address 192.168.8.15 --controlplane --leaderElection > /etc/kubernetes/manifests/kube-vip.yaml | |
--- | |
kind: MicrovmMachineTemplate | |
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | |
metadata: | |
name: "mvm-test-control-plane" | |
spec: | |
template: | |
spec: | |
vcpu: 2 | |
memoryMb: 2048 | |
rootVolume: | |
id: "root" | |
image: docker.io/richardcase/ubuntu-bionic-test:cloudimage_v0.0.1 | |
kernel: | |
image: docker.io/richardcase/ubuntu-bionic-kernel:0.0.11 | |
filename: vmlinux | |
kernelCmdline: "console=ttyS0 reboot=k panic=1 pci=off i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd ds=nocloud-net;s=http://169.254.169.254/latest/" | |
initrd: | |
image: docker.io/richardcase/ubuntu-bionic-kernel:0.0.11 | |
filename: initrd-generic | |
networkInterfaces: | |
- guestDeviceName: "eth0" | |
type: "macvtap" | |
failureDomain: "192.168.8.2:9090" # Temporary until failure domains on the cluster are working | |
# --- | |
# apiVersion: cluster.x-k8s.io/v1beta1 | |
# kind: MachineDeployment | |
# metadata: | |
# name: "mvm-test-md-0" | |
# spec: | |
# clusterName: "mvm-test" | |
# replicas: 1 | |
# selector: | |
# matchLabels: | |
# template: | |
# spec: | |
# clusterName: "mvm-test" | |
# version: "v1.20.0" | |
# bootstrap: | |
# configRef: | |
# name: "mvm-test-md-0" | |
# apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | |
# kind: KubeadmConfigTemplate | |
# infrastructureRef: | |
# name: "mvm-test-md-0" | |
# apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | |
# kind: MicrovmMachineTemplate | |
# --- | |
# apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | |
# kind: MicrovmMachineTemplate | |
# metadata: | |
# name: "mvm-test-md-0" | |
# spec: | |
# template: | |
# spec: | |
# vcpu: 2 | |
# memoryMb: 2048 | |
# rootVolume: | |
# image: docker.io/richardcase/ubuntu-bionic-test:cloudimage_v0.0.1 | |
# kernel: | |
# image: docker.io/richardcase/ubuntu-bionic-kernel:0.0.11 | |
# networkInterfaces: | |
# - guestDeviceName: "eth0" | |
# type: "macvtap" | |
# --- | |
# apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 | |
# kind: KubeadmConfigTemplate | |
# metadata: | |
# name: "mvm-test-md-0" | |
# spec: | |
# template: | |
# spec: | |
# joinConfiguration: | |
# nodeRegistration: | |
# kubeletExtraArgs: | |
# provider-id: "PROVIDER_ID" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment