Skip to content

Commit f81123a

Browse files
committed
make book use v1beta2 API
Signed-off-by: sivchari <shibuuuu5@gmail.com>
1 parent 3656b49 commit f81123a

File tree

13 files changed

+87
-87
lines changed

13 files changed

+87
-87
lines changed

docs/book/src/developer/core/controllers/machine-pool.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Note: Infrastructure providers can support MachinePool Machines by having the In
108108
Example
109109
```yaml
110110
kind: MyMachinePool
111-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
111+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
112112
spec:
113113
providerIDList:
114114
- cloud:////my-cloud-provider-id-0

docs/book/src/developer/providers/getting-started/building-running-and-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ You best watch the Kubernetes pods with something like `k9s -A` or `watch kubect
140140
Let's try our cluster out. We'll make some simple YAML:
141141

142142
```yaml
143-
apiVersion: cluster.x-k8s.io/v1beta1
143+
apiVersion: cluster.x-k8s.io/v1beta2
144144
kind: Cluster
145145
metadata:
146146
name: hello-mailgun
@@ -149,7 +149,7 @@ spec:
149149
pods:
150150
cidrBlocks: ["192.168.0.0/16"]
151151
infrastructureRef:
152-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1
152+
apiGroup: infrastructure.cluster.x-k8s.io/v1beta2
153153
kind: MailgunCluster
154154
name: hello-mailgun
155155
---

docs/book/src/security/pod-security-standards.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ By adding the following variables and patches Pod Security Standards can be adde
1212
### Adding the variables to a ClusterClass
1313

1414
```yaml
15-
apiVersion: cluster.x-k8s.io/v1beta1
15+
apiVersion: cluster.x-k8s.io/v1beta2
1616
kind: ClusterClass
1717
spec:
1818
variables:
@@ -62,7 +62,7 @@ Use this patch if the following keys **already exist** inside the `KubeadmContro
6262
- `.spec.template.spec.kubeadmConfigSpec.files`
6363

6464
```yaml
65-
apiVersion: cluster.x-k8s.io/v1beta1
65+
apiVersion: cluster.x-k8s.io/v1beta2
6666
kind: ClusterClass
6767
spec:
6868
...
@@ -71,7 +71,7 @@ spec:
7171
description: "Adds an admission configuration for PodSecurity to the kube-apiserver."
7272
definitions:
7373
- selector:
74-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
74+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
7575
kind: KubeadmControlPlaneTemplate
7676
matchResources:
7777
controlPlane: true
@@ -128,7 +128,7 @@ Use this patches if the following keys **do not** exist inside the `KubeadmContr
128128
> **Attention:** Existing values inside the `KubeadmControlPlaneTemplate` at the mentioned keys will be replaced by this patch.
129129
130130
```yaml
131-
apiVersion: cluster.x-k8s.io/v1beta1
131+
apiVersion: cluster.x-k8s.io/v1beta2
132132
kind: ClusterClass
133133
spec:
134134
...
@@ -137,7 +137,7 @@ spec:
137137
description: "Adds an admission configuration for PodSecurity to the kube-apiserver."
138138
definitions:
139139
- selector:
140-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
140+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
141141
kind: KubeadmControlPlaneTemplate
142142
matchResources:
143143
controlPlane: true
@@ -195,7 +195,7 @@ It is also possible to disable this patch or configure different levels for the
195195
using variables.
196196

197197
```yaml
198-
apiVersion: cluster.x-k8s.io/v1beta1
198+
apiVersion: cluster.x-k8s.io/v1beta2
199199
kind: Cluster
200200
metadata:
201201
name: "my-cluster"

docs/book/src/tasks/bootstrap/kubeadm-bootstrap/index.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ infrastructure object.
1717

1818
```yaml
1919
kind: DockerCluster
20-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
20+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
2121
metadata:
2222
name: my-cluster-docker
2323
---
2424
kind: Cluster
25-
apiVersion: cluster.x-k8s.io/v1beta1
25+
apiVersion: cluster.x-k8s.io/v1beta2
2626
metadata:
2727
name: my-cluster
2828
spec:
2929
infrastructureRef:
3030
kind: DockerCluster
31-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
31+
apiGroup: infrastructure.cluster.x-k8s.io
3232
name: my-cluster-docker
3333
```
3434
@@ -37,20 +37,20 @@ the `KubeadmConfig` bootstrap object.
3737

3838
```yaml
3939
kind: KubeadmConfig
40-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
40+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
4141
metadata:
4242
name: my-control-plane1-config
4343
spec:
4444
initConfiguration:
4545
nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
4646
---
4747
kind: DockerMachine
48-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
48+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
4949
metadata:
5050
name: my-control-plane1-docker
5151
---
5252
kind: Machine
53-
apiVersion: cluster.x-k8s.io/v1beta1
53+
apiVersion: cluster.x-k8s.io/v1beta2
5454
metadata:
5555
name: my-control-plane1
5656
labels:
@@ -61,11 +61,11 @@ spec:
6161
bootstrap:
6262
configRef:
6363
kind: KubeadmConfig
64-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
64+
apiGroup: bootstrap.cluster.x-k8s.io
6565
name: my-control-plane1-config
6666
infrastructureRef:
6767
kind: DockerMachine
68-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
68+
apiGroup: infrastructure.cluster.x-k8s.io
6969
name: my-control-plane1-docker
7070
version: "v1.19.1"
7171
```
@@ -107,38 +107,31 @@ Valid combinations of configuration objects are:
107107
Bootstrap control plane node:
108108
```yaml
109109
kind: KubeadmConfig
110-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
110+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
111111
metadata:
112112
name: my-control-plane1-config
113113
spec:
114114
initConfiguration:
115-
nodeRegistration:
116-
nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
117115
```
118116

119117
Additional control plane nodes:
120118
```yaml
121119
kind: KubeadmConfig
122-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
120+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
123121
metadata:
124122
name: my-control-plane2-config
125123
spec:
126124
joinConfiguration:
127-
nodeRegistration:
128-
nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
129-
controlPlane: {}
130125
```
131126

132127
worker nodes:
133128
```yaml
134129
kind: KubeadmConfig
135-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
130+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
136131
metadata:
137132
name: my-worker1-config
138133
spec:
139134
joinConfiguration:
140-
nodeRegistration:
141-
nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
142135
```
143136

144137
### Bootstrap Orchestration

docs/book/src/tasks/bootstrap/kubeadm-bootstrap/kubelet-config.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This method is easy to replace the whole kubelet configuration generated by kube
2222
### KubeadmControlPlaneTemplate
2323

2424
```yaml
25-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
25+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
2626
kind: KubeadmControlPlaneTemplate
2727
metadata:
2828
name: cloudinit-control-plane
@@ -98,19 +98,21 @@ spec:
9898
criSocket: unix:///var/run/containerd/containerd.sock
9999
# Here we configure kubelet to use the KubeletConfiguration file we put on nodes via KubeadmConfigSpec.files
100100
kubeletExtraArgs:
101-
config: "/etc/kubernetes/kubelet/config.yaml"
101+
- name: config
102+
value: "/etc/kubernetes/kubelet/config.yaml"
102103
joinConfiguration:
103104
nodeRegistration:
104105
criSocket: unix:///var/run/containerd/containerd.sock
105106
# Here we configure kubelet to use the KubeletConfiguration file we put on nodes via KubeadmConfigSpec.files
106107
kubeletExtraArgs:
107-
config: "/etc/kubernetes/kubelet/config.yaml"
108+
- name: config
109+
value: "/etc/kubernetes/kubelet/config.yaml"
108110
```
109111
110112
### KubeadmConfigTemplate
111113
112114
```yaml
113-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
115+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
114116
kind: KubeadmConfigTemplate
115117
metadata:
116118
name: cloudinit-default-worker-bootstraptemplate
@@ -185,7 +187,8 @@ spec:
185187
criSocket: unix:///var/run/containerd/containerd.sock
186188
# Here we configure kubelet to use the KubeletConfiguration file we put on nodes via KubeadmConfigSpec.files
187189
kubeletExtraArgs:
188-
config: "/etc/kubernetes/kubelet/config.yaml"
190+
- name: config
191+
value: "/etc/kubernetes/kubelet/config.yaml"
189192
```
190193
191194
## Set kubelet flags via `KubeadmConfigSpec.kubeletExtraArgs`
@@ -197,7 +200,7 @@ This method is useful when you want to set kubelet flags that are not configurab
197200
### KubeadmControlPlaneTemplate
198201

199202
```yaml
200-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
203+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
201204
kind: KubeadmControlPlaneTemplate
202205
metadata:
203206
name: kubelet-extra-args-control-plane
@@ -211,23 +214,29 @@ spec:
211214
criSocket: unix:///var/run/containerd/containerd.sock
212215
# Set kubelet flags via KubeadmConfigSpec.kubeletExtraArgs
213216
kubeletExtraArgs:
214-
kube-reserved: cpu=1,memory=2Gi,ephemeral-storage=1Gi
215-
system-reserved: cpu=500m,memory=1Gi,ephemeral-storage=1Gi
216-
eviction-hard: memory.available<500Mi,nodefs.available<10%
217+
- name: kube-reserved
218+
value: "cpu=1,memory=2Gi,ephemeral-storage=1Gi"
219+
- name: system-reserved
220+
value: "cpu=500m,memory=1Gi,ephemeral-storage=1Gi"
221+
- name: eviction-hard
222+
value: "memory.available<500Mi,nodefs.available<10%"
217223
joinConfiguration:
218224
nodeRegistration:
219225
criSocket: unix:///var/run/containerd/containerd.sock
220226
# Set kubelet flags via KubeadmConfigSpec.kubeletExtraArgs
221227
kubeletExtraArgs:
222-
kube-reserved: cpu=1,memory=2Gi,ephemeral-storage=1Gi
223-
system-reserved: cpu=500m,memory=1Gi,ephemeral-storage=1Gi
224-
eviction-hard: memory.available<500Mi,nodefs.available<10%
228+
- name: kube-reserved
229+
value: "cpu=1,memory=2Gi,ephemeral-storage=1Gi"
230+
- name: system-reserved
231+
value: "cpu=500m,memory=1Gi,ephemeral-storage=1Gi"
232+
- name: eviction-hard
233+
value: "memory.available<500Mi,nodefs.available<10%"
225234
```
226235

227236
### KubeadmConfigTemplate
228237

229238
```yaml
230-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
239+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
231240
kind: KubeadmConfigTemplate
232241
metadata:
233242
name: kubelet-extra-args-default-worker-bootstraptemplate
@@ -240,9 +249,12 @@ spec:
240249
criSocket: unix:///var/run/containerd/containerd.sock
241250
# Set kubelet flags via KubeadmConfigSpec.kubeletExtraArgs
242251
kubeletExtraArgs:
243-
kube-reserved: cpu=1,memory=2Gi,ephemeral-storage=1Gi
244-
system-reserved: cpu=500m,memory=1Gi,ephemeral-storage=1Gi
245-
eviction-hard: memory.available<500Mi,nodefs.available<10%
252+
- name: kube-reserved
253+
value: "cpu=1,memory=2Gi,ephemeral-storage=1Gi"
254+
- name: system-reserved
255+
value: "cpu=500m,memory=1Gi,ephemeral-storage=1Gi"
256+
- name: eviction-hard
257+
value: "memory.available<500Mi,nodefs.available<10%"
246258
```
247259

248260
## Use kubeadm's `kubeletconfiguration` patch target
@@ -254,7 +266,7 @@ This method is useful when you want to change the kubelet configuration file par
254266
### KubeadmControlPlaneTemplate
255267

256268
```yaml
257-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
269+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
258270
kind: KubeadmControlPlaneTemplate
259271
metadata:
260272
name: kubeadm-config-template-control-plane
@@ -306,7 +318,7 @@ spec:
306318
### KubeadmConfigTemplate
307319

308320
```yaml
309-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
321+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
310322
kind: KubeadmConfigTemplate
311323
metadata:
312324
name: kubeadm-config-template-default-worker-bootstraptemplate
@@ -346,4 +358,4 @@ spec:
346358
# Here we specify the directory that contains the patch files
347359
patches:
348360
directory: /etc/kubernetes/patches
349-
```
361+
```

docs/book/src/tasks/bootstrap/microk8s-bootstrap.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ Cluster API bootstrap provider MicroK8s (CABPM) is a component responsible for g
1313
MicroK8s defines a `MicroK8sControlPlane` definition as well as the `MachineDeployment` to configure the control plane and worker nodes respectively. The `MicroK8sControlPlane` is linked in the cluster definition as shown in the following example:
1414

1515
```yaml
16-
apiVersion: cluster.x-k8s.io/v1beta1
16+
apiVersion: cluster.x-k8s.io/v1beta2
1717
kind: Cluster
1818
spec:
1919
controlPlaneRef:
20-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
20+
apiGroup: controlplane.cluster.x-k8s.io
2121
kind: MicroK8sControlPlane
2222
name: capi-aws-control-plane
2323
```
2424
2525
A control plane manifest section includes the Kubernetes version, the replica number as well as the `MicroK8sConfig`:
2626

2727
```yaml
28-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
28+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
2929
kind: MicroK8sControlPlane
3030
spec:
3131
controlPlaneConfig:
@@ -41,7 +41,7 @@ spec:
4141
The worker nodes are configured through the `MachineDeployment` object:
4242

4343
```yaml
44-
apiVersion: cluster.x-k8s.io/v1beta1
44+
apiVersion: cluster.x-k8s.io/v1beta2
4545
kind: MachineDeployment
4646
metadata:
4747
name: capi-aws-md-0
@@ -57,7 +57,7 @@ spec:
5757
version: v1.23.0
5858
bootstrap:
5959
configRef:
60-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
60+
apiGroup: bootstrap.cluster.x-k8s.io
6161
kind: MicroK8sConfigTemplate
6262
name: capi-aws-md-0
6363
......

docs/book/src/tasks/certs/auto-rotate-certificates-in-kcp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ To configure a rollout on the KCP machines you need to set `.rolloutBefore.certi
1010

1111
Example:
1212
```yaml
13-
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
13+
apiVersion: controlplane.cluster.x-k8s.io/v1beta2
1414
kind: KubeadmControlPlane
1515
metadata:
1616
name: example-control-plane
@@ -64,4 +64,4 @@ KubeadmConfig corresponding to the current machine.
6464
</aside>
6565

6666
<!-- links -->
67-
[RFC3339]: https://www.ietf.org/rfc/rfc3339.txt
67+
[RFC3339]: https://www.ietf.org/rfc/rfc3339.txt

docs/book/src/tasks/cluster-resource-set.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This can be accomplished by labeling the clusters with the specific cloud (e.g.
1919
For example, you could have the following for OpenStack:
2020

2121
```yaml
22-
apiVersion: addons.cluster.x-k8s.io/v1beta1
22+
apiVersion: addons.cluster.x-k8s.io/v1beta2
2323
kind: ClusterResourceSet
2424
metadata:
2525
name: cloud-provider-openstack

0 commit comments

Comments
 (0)