Skip to content

Commit d705d55

Browse files
sivcharik8s-infra-cherrypick-robot
authored andcommitted
update resource in docs
Signed-off-by: sivchari <[email protected]>
1 parent 2fbf12b commit d705d55

File tree

10 files changed

+59
-49
lines changed

10 files changed

+59
-49
lines changed

docs/book/src/developer/providers/contracts/bootstrap-config.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ labels:
143143
cluster.x-k8s.io/v1alpha2: v1alpha1
144144
cluster.x-k8s.io/v1alpha3: v1alpha2
145145
cluster.x-k8s.io/v1beta1: v1beta1
146+
cluster.x-k8s.io/v1beta2: v1beta2
146147
```
147148

148149
An example of this is in the [Kubeadm Bootstrap provider](https://github.com/kubernetes-sigs/cluster-api/blob/release-1.1/controlplane/kubeadm/config/crd/kustomization.yaml).

docs/book/src/developer/providers/contracts/control-plane.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ labels:
168168
cluster.x-k8s.io/v1alpha2: v1alpha1
169169
cluster.x-k8s.io/v1alpha3: v1alpha2
170170
cluster.x-k8s.io/v1beta1: v1beta1
171+
cluster.x-k8s.io/v1beta2: v1beta2
171172
```
172173

173174
An example of this is in the [Kubeadm Bootstrap provider](https://github.com/kubernetes-sigs/cluster-api/blob/release-1.1/controlplane/kubeadm/config/crd/kustomization.yaml).

docs/book/src/developer/providers/contracts/infra-cluster.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ labels:
152152
cluster.x-k8s.io/v1alpha2: v1alpha1
153153
cluster.x-k8s.io/v1alpha3: v1alpha2
154154
cluster.x-k8s.io/v1beta1: v1beta1
155+
cluster.x-k8s.io/v1beta2: v1beta2
155156
```
156157

157158
An example of this is in the [Kubeadm Bootstrap provider](https://github.com/kubernetes-sigs/cluster-api/blob/release-1.1/controlplane/kubeadm/config/crd/kustomization.yaml).

docs/book/src/developer/providers/contracts/infra-machine.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ labels:
144144
cluster.x-k8s.io/v1alpha2: v1alpha1
145145
cluster.x-k8s.io/v1alpha3: v1alpha2
146146
cluster.x-k8s.io/v1beta1: v1beta1
147+
cluster.x-k8s.io/v1beta2: v1beta2
147148
```
148149

149150
An example of this is in the [Kubeadm Bootstrap provider](https://github.com/kubernetes-sigs/cluster-api/blob/release-1.1/controlplane/kubeadm/config/crd/kustomization.yaml).

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

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ 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
---
@@ -37,20 +37,19 @@ 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:
45-
nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
4645
---
4746
kind: DockerMachine
48-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
47+
apiVersion: infrastructure.cluster.x-k8s.io/v1beta2
4948
metadata:
5049
name: my-control-plane1-docker
5150
---
5251
kind: Machine
53-
apiVersion: cluster.x-k8s.io/v1beta1
52+
apiVersion: cluster.x-k8s.io/v1beta2
5453
metadata:
5554
name: my-control-plane1
5655
labels:
@@ -60,12 +59,12 @@ metadata:
6059
spec:
6160
bootstrap:
6261
configRef:
62+
apiGroup: bootstrap.cluster.x-k8s.io
6363
kind: KubeadmConfig
64-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
6564
name: my-control-plane1-config
6665
infrastructureRef:
66+
apiGroup: infrastructure.cluster.x-k8s.io
6767
kind: DockerMachine
68-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
6968
name: my-control-plane1-docker
7069
version: "v1.19.1"
7170
```
@@ -107,38 +106,32 @@ Valid combinations of configuration objects are:
107106
Bootstrap control plane node:
108107
```yaml
109108
kind: KubeadmConfig
110-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
109+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
111110
metadata:
112111
name: my-control-plane1-config
113112
spec:
114113
initConfiguration:
115-
nodeRegistration:
116-
nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
117114
```
118115

119116
Additional control plane nodes:
120117
```yaml
121118
kind: KubeadmConfig
122-
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
119+
apiVersion: bootstrap.cluster.x-k8s.io/v1beta2
123120
metadata:
124121
name: my-control-plane2-config
125122
spec:
126123
joinConfiguration:
127-
nodeRegistration:
128-
nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use.
129124
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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,10 +57,9 @@ 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
63-
......
6463
---
6564
apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
6665
kind: MicroK8sConfigTemplate
@@ -70,6 +69,7 @@ metadata:
7069
spec:
7170
template:
7271
spec: {}
72+
......
7373
```
7474

7575
In both the `MicroK8sControlPlane` and `MicroK8sConfigTemplate` you can set a `MicroK8sConfig` object. In the `MicroK8sControlPlane` case `MicroK8sConfig` is under `MicroK8sConfig.spec.controlPlaneConfig` whereas in `MicroK8sConfigTemplate` it is under `MicroK8sConfigTemplate.spec.template.spec`.

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

Lines changed: 5 additions & 4 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
@@ -25,8 +25,9 @@ spec:
2525
joinConfiguration:
2626
...
2727
machineTemplate:
28-
infrastructureRef:
29-
...
28+
spec:
29+
infrastructureRef:
30+
...
3031
replicas: 1
3132
version: v1.23.3
3233
```
@@ -64,4 +65,4 @@ KubeadmConfig corresponding to the current machine.
6465
</aside>
6566

6667
<!-- links -->
67-
[RFC3339]: https://www.ietf.org/rfc/rfc3339.txt
68+
[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

docs/book/src/tasks/experimental-features/runtime-sdk/implement-lifecycle-hooks.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
4848
kind: BeforeClusterCreateRequest
4949
settings: <Runtime Extension settings>
5050
cluster:
51-
apiVersion: cluster.x-k8s.io/v1beta1
51+
apiVersion: cluster.x-k8s.io/v1beta2
5252
kind: Cluster
5353
metadata:
5454
name: test-cluster
@@ -89,7 +89,7 @@ apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
8989
kind: AfterControlPlaneInitializedRequest
9090
settings: <Runtime Extension settings>
9191
cluster:
92-
apiVersion: cluster.x-k8s.io/v1beta1
92+
apiVersion: cluster.x-k8s.io/v1beta2
9393
kind: Cluster
9494
metadata:
9595
name: test-cluster
@@ -130,7 +130,7 @@ apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
130130
kind: BeforeClusterUpgradeRequest
131131
settings: <Runtime Extension settings>
132132
cluster:
133-
apiVersion: cluster.x-k8s.io/v1beta1
133+
apiVersion: cluster.x-k8s.io/v1beta2
134134
kind: Cluster
135135
metadata:
136136
name: test-cluster
@@ -179,7 +179,7 @@ apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
179179
kind: AfterControlPlaneUpgradeRequest
180180
settings: <Runtime Extension settings>
181181
cluster:
182-
apiVersion: cluster.x-k8s.io/v1beta1
182+
apiVersion: cluster.x-k8s.io/v1beta2
183183
kind: Cluster
184184
metadata:
185185
name: test-cluster
@@ -216,7 +216,7 @@ apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
216216
kind: AfterClusterUpgradeRequest
217217
settings: <Runtime Extension settings>
218218
cluster:
219-
apiVersion: cluster.x-k8s.io/v1beta1
219+
apiVersion: cluster.x-k8s.io/v1beta2
220220
kind: Cluster
221221
metadata:
222222
name: test-cluster
@@ -252,7 +252,7 @@ apiVersion: hooks.runtime.cluster.x-k8s.io/v1alpha1
252252
kind: BeforeClusterDeleteRequest
253253
settings: <Runtime Extension settings>
254254
cluster:
255-
apiVersion: cluster.x-k8s.io/v1beta1
255+
apiVersion: cluster.x-k8s.io/v1beta2
256256
kind: Cluster
257257
metadata:
258258
name: test-cluster

0 commit comments

Comments
 (0)