Skip to content

Commit 34ffad7

Browse files
committed
kubeadm: update API types documentation for 1.12
v1alpha2 -> v1alpha3 MasterConfiguration -> [new-api-types]
1 parent 3286b00 commit 34ffad7

6 files changed

Lines changed: 37 additions & 182 deletions

File tree

content/en/docs/reference/setup-tools/kubeadm/implementation-details.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,9 @@ Please note that:
324324

325325
1. To make dynamic kubelet configuration work, flag `--dynamic-config-dir=/var/lib/kubelet/config/dynamic` should be specified
326326
in `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf`
327-
1. Kubelet init configuration can be changed by using kubeadm MasterConfiguration file by setting `.kubeletConfiguration.baseConfig`.
328-
See [using kubeadm init with a configuration file](/docs/reference/setup-tools/kubeadm/kubeadm-init/#config-file) for more detail
327+
1. The kubelet configuration can be changed by passing a `KubeletConfiguration` object to `kubeadm init` or `kubeadm join` by using
328+
a configuration file `--config some-file.yaml`. The `KubeletConfiguration` object can be separated from other objects such
329+
as `InitConfiguration` using the `---` separator. For more details have a look at the `kubeadm config print-default` command.
329330

330331
### Wait for the control plane to come up
331332

@@ -346,7 +347,7 @@ If kubeadm is invoked with `--feature-gates=DynamicKubeletConfig`:
346347
(that is `system:bootstrappers:kubeadm:default-node-token` and `system:nodes` groups)
347348
3. Enable the dynamic kubelet configuration feature for the initial master node by pointing `Node.spec.configSource` to the newly-created ConfigMap
348349

349-
### Save kubeadm MasterConfiguration in a ConfigMap for later reference
350+
### Save the kubeadm ClusterConfiguration in a ConfigMap for later reference
350351

351352
kubeadm saves the configuration passed to `kubeadm init`, either via flags or the config file, in a ConfigMap
352353
named `kubeadm-config` under `kube-system` namespace.

content/en/docs/reference/setup-tools/kubeadm/kubeadm-init.md

Lines changed: 5 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -102,165 +102,17 @@ configuration file options. This file is passed in the `--config` option.
102102

103103
In Kubernetes 1.11 and later, the default configuration can be printed out using the
104104
[kubeadm config print-default](/docs/reference/setup-tools/kubeadm/kubeadm-config/) command.
105-
It is **recommended** that you migrate your old `v1alpha1` configuration to `v1alpha2` using
105+
It is **recommended** that you migrate your old `v1alpha2` configuration to `v1alpha3` using
106106
the [kubeadm config migrate](/docs/reference/setup-tools/kubeadm/kubeadm-config/) command,
107-
because `v1alpha1` will be removed in Kubernetes 1.12.
107+
because `v1alpha2` will be removed in Kubernetes 1.13.
108108

109109
For more details on each field in the configuration you can navigate to our
110-
[API reference pages.] (https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#MasterConfiguration)
111-
112-
Example of the kubeadm MasterConfiguration version `v1alpha2`:
113-
114-
```yaml
115-
apiVersion: kubeadm.k8s.io/v1alpha2
116-
kind: MasterConfiguration
117-
kubernetesVersion: v1.11.0
118-
api:
119-
advertiseAddress: 192.168.0.102
120-
bindPort: 6443
121-
controlPlaneEndpoint: ""
122-
auditPolicy:
123-
logDir: /var/log/kubernetes/audit
124-
logMaxAge: 2
125-
path: ""
126-
bootstrapTokens:
127-
- groups:
128-
- system:bootstrappers:kubeadm:default-node-token
129-
token: abcdef.0123456789abcdef
130-
ttl: 24h0m0s
131-
usages:
132-
- signing
133-
- authentication
134-
certificatesDir: /etc/kubernetes/pki
135-
clusterName: kubernetes
136-
etcd:
137-
local:
138-
dataDir: /var/lib/etcd
139-
image: ""
140-
imageRepository: k8s.gcr.io
141-
kubeProxy:
142-
config:
143-
bindAddress: 0.0.0.0
144-
clientConnection:
145-
acceptContentTypes: ""
146-
burst: 10
147-
contentType: application/vnd.kubernetes.protobuf
148-
kubeconfig: /var/lib/kube-proxy/kubeconfig.conf
149-
qps: 5
150-
clusterCIDR: ""
151-
configSyncPeriod: 15m0s
152-
conntrack:
153-
max: null
154-
maxPerCore: 32768
155-
min: 131072
156-
tcpCloseWaitTimeout: 1h0m0s
157-
tcpEstablishedTimeout: 24h0m0s
158-
enableProfiling: false
159-
healthzBindAddress: 0.0.0.0:10256
160-
hostnameOverride: ""
161-
iptables:
162-
masqueradeAll: false
163-
masqueradeBit: 14
164-
minSyncPeriod: 0s
165-
syncPeriod: 30s
166-
ipvs:
167-
ExcludeCIDRs: null
168-
minSyncPeriod: 0s
169-
scheduler: ""
170-
syncPeriod: 30s
171-
metricsBindAddress: 127.0.0.1:10249
172-
mode: ""
173-
nodePortAddresses: null
174-
oomScoreAdj: -999
175-
portRange: ""
176-
resourceContainer: /kube-proxy
177-
udpIdleTimeout: 250ms
178-
kubeletConfiguration:
179-
baseConfig:
180-
address: 0.0.0.0
181-
authentication:
182-
anonymous:
183-
enabled: false
184-
webhook:
185-
cacheTTL: 2m0s
186-
enabled: true
187-
x509:
188-
clientCAFile: /etc/kubernetes/pki/ca.crt
189-
authorization:
190-
mode: Webhook
191-
webhook:
192-
cacheAuthorizedTTL: 5m0s
193-
cacheUnauthorizedTTL: 30s
194-
cgroupDriver: cgroupfs
195-
cgroupsPerQOS: true
196-
clusterDNS:
197-
- 10.96.0.10
198-
clusterDomain: cluster.local
199-
containerLogMaxFiles: 5
200-
containerLogMaxSize: 10Mi
201-
contentType: application/vnd.kubernetes.protobuf
202-
cpuCFSQuota: true
203-
cpuManagerPolicy: none
204-
cpuManagerReconcilePeriod: 10s
205-
enableControllerAttachDetach: true
206-
enableDebuggingHandlers: true
207-
enforceNodeAllocatable:
208-
- pods
209-
eventBurst: 10
210-
eventRecordQPS: 5
211-
evictionHard:
212-
imagefs.available: 15%
213-
memory.available: 100Mi
214-
nodefs.available: 10%
215-
nodefs.inodesFree: 5%
216-
evictionPressureTransitionPeriod: 5m0s
217-
failSwapOn: true
218-
fileCheckFrequency: 20s
219-
hairpinMode: promiscuous-bridge
220-
healthzBindAddress: 127.0.0.1
221-
healthzPort: 10248
222-
httpCheckFrequency: 20s
223-
imageGCHighThresholdPercent: 85
224-
imageGCLowThresholdPercent: 80
225-
imageMinimumGCAge: 2m0s
226-
iptablesDropBit: 15
227-
iptablesMasqueradeBit: 14
228-
kubeAPIBurst: 10
229-
kubeAPIQPS: 5
230-
makeIPTablesUtilChains: true
231-
maxOpenFiles: 1000000
232-
maxPods: 110
233-
nodeStatusUpdateFrequency: 10s
234-
oomScoreAdj: -999
235-
podPidsLimit: -1
236-
port: 10250
237-
registryBurst: 10
238-
registryPullQPS: 5
239-
resolvConf: /etc/resolv.conf
240-
rotateCertificates: true
241-
runtimeRequestTimeout: 2m0s
242-
serializeImagePulls: true
243-
staticPodPath: /etc/kubernetes/manifests
244-
streamingConnectionIdleTimeout: 4h0m0s
245-
syncFrequency: 1m0s
246-
volumeStatsAggPeriod: 1m0s
247-
networking:
248-
dnsDomain: cluster.local
249-
podSubnet: ""
250-
serviceSubnet: 10.96.0.0/12
251-
nodeRegistration:
252-
criSocket: /var/run/dockershim.sock
253-
name: your-host-name
254-
taints:
255-
- effect: NoSchedule
256-
key: node-role.kubernetes.io/master
257-
unifiedControlPlaneImage: ""
258-
```
110+
[API reference pages.] (https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm)
259111

260112
### Adding kube-proxy parameters {#kube-proxy}
261113

262-
For information about kube-proxy parameters in the MasterConfiguration see:
263-
- [kube-proxy](https://godoc.org/k8s.io/kubernetes/pkg/proxy/apis/kubeproxyconfig/v1alpha1#KubeProxyConfiguration)
114+
For information about kube-proxy parameters in the kubeadm configuration see:
115+
- [kube-proxy](https://godoc.org/k8s.io/kubernetes/pkg/proxy/apis/config#KubeProxyConfiguration)
264116

265117
### Passing custom flags to control plane components {#control-plane-flags}
266118

content/en/docs/setup/independent/control-plane-flags.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ These fields consist of `key: value` pairs. To override a flag for a control pla
2020
2. Add the flags to override to the field.
2121

2222
For more details on each field in the configuration you can navigate to our
23-
[API reference pages](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#MasterConfiguration).
23+
[API reference pages](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm#ClusterConfiguration).
2424

2525
{{% /capture %}}
2626

@@ -32,11 +32,11 @@ For details, see the [reference documentation for kube-apiserver](https://kubern
3232

3333
Example usage:
3434
```yaml
35-
apiVersion: kubeadm.k8s.io/v1alpha2
36-
kind: MasterConfiguration
37-
kubernetesVersion: v1.11.0
35+
apiVersion: kubeadm.k8s.io/v1alpha3
36+
kind: ClusterConfiguration
37+
kubernetesVersion: v1.12.0
3838
metadata:
39-
name: 1.11-sample
39+
name: 1.12-sample
4040
apiServerExtraArgs:
4141
advertise-address: 192.168.0.103
4242
anonymous-auth: false
@@ -50,11 +50,11 @@ For details, see the [reference documentation for kube-controller-manager](https
5050
5151
Example usage:
5252
```yaml
53-
apiVersion: kubeadm.k8s.io/v1alpha2
54-
kind: MasterConfiguration
55-
kubernetesVersion: v1.11.0
53+
apiVersion: kubeadm.k8s.io/v1alpha3
54+
kind: ClusterConfiguration
55+
kubernetesVersion: v1.12.0
5656
metadata:
57-
name: 1.11-sample
57+
name: 1.12-sample
5858
controllerManagerExtraArgs:
5959
cluster-signing-key-file: /home/johndoe/keys/ca.key
6060
bind-address: 0.0.0.0
@@ -67,11 +67,11 @@ For details, see the [reference documentation for kube-scheduler](https://kubern
6767
6868
Example usage:
6969
```yaml
70-
apiVersion: kubeadm.k8s.io/v1alpha2
71-
kind: MasterConfiguration
72-
kubernetesVersion: v1.11.0
70+
apiVersion: kubeadm.k8s.io/v1alpha3
71+
kind: ClusterConfiguration
72+
kubernetesVersion: v1.12.0
7373
metadata:
74-
name: 1.11-sample
74+
name: 1.12-sample
7575
schedulerExtraArgs:
7676
address: 0.0.0.0
7777
config: /home/johndoe/schedconfig.yaml

content/en/docs/setup/independent/kubelet-integration.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ manager instead, but you need to configure it manually.
2323
Some kubelet configuration details need to be the same across all kubelets involved in the cluster, while
2424
other configuration aspects need to be set on a per-kubelet basis, to accommodate the different
2525
characteristics of a given machine, such as OS, storage, and networking. You can manage the configuration
26-
of your kubelets manually, but [kubeadm now provides a `MasterConfig` API type for managing your
26+
of your kubelets manually, but [kubeadm now provides a `KubeletConfiguration` API type for managing your
2727
kubelet configurations centrally](#configure-kubelets-using-kubeadm).
2828

2929
{{% /capture %}}
@@ -63,10 +63,7 @@ clusterDNS:
6363
- 10.96.0.10
6464
```
6565
66-
See the
67-
[API reference for the
68-
kubelet ComponentConfig](https://godoc.org/k8s.io/kubernetes/pkg/kubelet/apis/kubeletconfig#KubeletConfiguration)
69-
for more information.
66+
For more details on the ComponentConfig have a look at [this section](#configure-kubelets-using-kubeadm).
7067
7168
### Providing instance-specific configuration details
7269
@@ -96,14 +93,19 @@ such as systemd.
9693

9794
## Configure kubelets using kubeadm
9895

99-
The kubeadm config API type `MasterConfiguration` embeds the kubelet's ComponentConfig under
100-
the `.kubeletConfiguration.baseConfig` key. Any user writing a `MasterConfiguration`
101-
file can use this configuration key to also set the base-level configuration for all kubelets
102-
in the cluster.
96+
It is possible to configure the kubelet that kubeadm will start if a custom `KubeletConfiguration`
97+
API object is passed with a configuration file like so `kubeadm ... --config some-config-file.yaml`.
98+
99+
By calling `kubeadm config print-default --api-objects KubeletConfiguration` you can
100+
see all the default values for this structure.
101+
102+
Also have a look at the [API reference for the
103+
kubelet ComponentConfig](https://godoc.org/k8s.io/kubernetes/pkg/kubelet/apis/config#KubeletConfiguration)
104+
for more information on the individual fields.
103105

104106
### Workflow when using `kubeadm init`
105107

106-
When you call `kubeadm init`, the `.kubeletConfiguration.baseConfig` structure is marshalled to disk
108+
When you call `kubeadm init`, the kubelet configuration is marshalled to disk
107109
at `/var/lib/kubelet/config.yaml`, and also uploaded to a ConfigMap in the cluster. The ConfigMap
108110
is named `kubelet-config-1.X`, where `.X` is the minor version of the Kubernetes version you are
109111
initializing. A kubelet configuration file is also written to `/etc/kubernetes/kubelet.conf` with the

content/en/docs/setup/independent/setup-ha-etcd-with-kubeadm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ this example.
8383
HOST=${ETCDHOSTS[$i]}
8484
NAME=${NAMES[$i]}
8585
cat << EOF > /tmp/${HOST}/kubeadmcfg.yaml
86-
apiVersion: "kubeadm.k8s.io/v1alpha2"
87-
kind: MasterConfiguration
86+
apiVersion: "kubeadm.k8s.io/v1alpha3"
87+
kind: ClusterConfiguration
8888
etcd:
8989
local:
9090
serverCertSANs:

content/en/docs/setup/independent/troubleshooting-kubeadm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc6
190190
curl http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address
191191
```
192192

193-
The workaround is to tell `kubelet` which IP to use using `--node-ip`. When using Digital Ocean, it can be the public one (assigned to `eth0`) or the private one (assigned to `eth1`) should you want to use the optional private network. The [KubeletExtraArgs section of the MasterConfiguration file](https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/v1alpha2/types.go#L147) can be used for this.
193+
The workaround is to tell `kubelet` which IP to use using `--node-ip`. When using Digital Ocean, it can be the public one (assigned to `eth0`) or the private one (assigned to `eth1`) should you want to use the optional private network. The [`KubeletExtraArgs` section of the kubeadm `NodeRegistrationOptions` structure](https://github.com/kubernetes/kubernetes/blob/release-1.12/cmd/kubeadm/app/apis/kubeadm/v1alpha3/types.go#L163-L166) can be used for this.
194194

195195
Then restart `kubelet`:
196196

0 commit comments

Comments
 (0)