-
Notifications
You must be signed in to change notification settings - Fork 0
/
cluster-vanilla.yaml
158 lines (158 loc) · 4.19 KB
/
cluster-vanilla.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: lm-demo
namespace: default
spec:
clusterNetwork:
pods:
cidrBlocks:
- 10.244.0.0/16
services:
cidrBlocks:
- 10.245.0.0/16
controlPlaneRef:
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
name: lm-demo-control-plane
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: MicrovmCluster
name: lm-demo
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: MicrovmCluster
metadata:
name: lm-demo
namespace: default
spec:
sshPublicKeys:
- user: "root"
authorizedKeys:
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILAkGdT5fjk7uNoA+bkGfSYUFnLFUolZNLNZ4x1ciDG/ claudia@weave.works"
controlPlaneEndpoint:
host: 192.168.1.63
port: 6443
placement:
staticPool:
hosts:
- controlplaneAllowed: true
endpoint: 192.168.1.216:9090
---
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
kind: KubeadmControlPlane
metadata:
name: lm-demo-control-plane
namespace: default
spec:
kubeadmConfigSpec:
clusterConfiguration: {}
initConfiguration:
nodeRegistration:
ignorePreflightErrors:
- SystemVerification
kubeletExtraArgs:
provider-id: microvm://{{ ds.meta_data.vm_host }}/{{ ds.meta_data.instance_id
}}
joinConfiguration:
nodeRegistration:
ignorePreflightErrors:
- DirAvailable--etc-kubernetes-manifests
- SystemVerification
kubeletExtraArgs:
provider-id: microvm://{{ ds.meta_data.vm_host }}/{{ ds.meta_data.instance_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.1.63 --controlplane --leaderElection > /etc/kubernetes/manifests/kube-vip.yaml
machineTemplate:
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: MicrovmMachineTemplate
name: lm-demo-control-plane
replicas: 1
version: v1.21.8
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: MicrovmMachineTemplate
metadata:
name: lm-demo-control-plane
namespace: default
spec:
template:
spec:
kernel:
filename: boot/image
image: docker.io/claudiaberesford/flintlock-kernel-arm:5.10.77
kernelCmdline: {}
memoryMb: 2048
networkInterfaces:
- guestDeviceName: eth1
type: macvtap
rootVolume:
id: root
image: docker.io/claudiaberesford/capmvm-kubernetes-arm:1.21.8
vcpu: 2
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
metadata:
name: lm-demo-md-0
namespace: default
spec:
clusterName: lm-demo
replicas: 2
selector:
matchLabels: null
template:
spec:
bootstrap:
configRef:
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
name: lm-demo-md-0
clusterName: lm-demo
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: MicrovmMachineTemplate
name: lm-demo-md-0
version: v1.21.8
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
kind: MicrovmMachineTemplate
metadata:
name: lm-demo-md-0
namespace: default
spec:
template:
spec:
kernel:
filename: boot/image
image: docker.io/claudiaberesford/flintlock-kernel-arm:5.10.77
kernelCmdline: {}
memoryMb: 2048
networkInterfaces:
- guestDeviceName: eth1
type: macvtap
rootVolume:
id: root
image: docker.io/claudiaberesford/capmvm-kubernetes-arm:1.21.8
vcpu: 2
---
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: KubeadmConfigTemplate
metadata:
name: lm-demo-md-0
namespace: default
spec:
template:
spec:
joinConfiguration:
nodeRegistration:
ignorePreflightErrors:
- SystemVerification
kubeletExtraArgs:
provider-id: microvm://{{ ds.meta_data.vm_host }}/{{ ds.meta_data.instance_id
}}