bf23c87e52
This page adds instructions on how to use the kubeadm config to pass flags to control plane components. The provided examples are pretty basic. Later this can be expanded with actual user stories.
2.3 KiB
2.3 KiB
reviewers, title, content_template, weight
| reviewers | title | content_template | weight | |
|---|---|---|---|---|
|
Customizing control plane configuration with kubeadm | templates/concept | 50 |
{{% capture overview %}}
kubeadm’s configuration exposes the following fields that can be used to override the default flags passed to control plane components such as the APIServer, ControllerManager and Scheduler:
APIServerExtraArgsControllerManagerExtraArgsSchedulerExtraArgs
These fields consist of key: value pairs. To override a flag for a control plane component:
- Add the appropriate field to your configuration.
- Add the flags to override to the field.
For more details on each field in the configuration you can navigate to our API reference pages.
{{% /capture %}}
{{% capture body %}}
APIServer flags
For details, see the reference documentation for kube-apiserver.
Example usage:
apiVersion: kubeadm.k8s.io/v1alpha2
kind: MasterConfiguration
kubernetesVersion: v1.11.0
metadata:
name: 1.11-sample
apiServerExtraArgs:
advertise-address: 192.168.0.103
anonymous-auth: false
enable-admission-plugins: AlwaysPullImages,DefaultStorageClass
audit-log-path: /home/johndoe/audit.log
ControllerManager flags
For details, see the reference documentation for kube-controller-manager.
Example usage:
apiVersion: kubeadm.k8s.io/v1alpha2
kind: MasterConfiguration
kubernetesVersion: v1.11.0
metadata:
name: 1.11-sample
controllerManagerExtraArgs:
cluster-signing-key-file: /home/johndoe/keys/ca.key
bind-address: 0.0.0.0
deployment-controller-sync-period: 50
Scheduler flags
For details, see the reference documentation for kube-scheduler.
Example usage:
apiVersion: kubeadm.k8s.io/v1alpha2
kind: MasterConfiguration
kubernetesVersion: v1.11.0
metadata:
name: 1.11-sample
schedulerExtraArgs:
address: 0.0.0.0
config: /home/johndoe/schedconfig.yaml
kubeconfig: /home/johndoe/kubeconfig.yaml
{{% /capture %}}