K8S: convert "kubeadm init" command-line arguments to "--config" YAML K8S: convert "kubeadm init" command-line arguments to "--config" YAML kubernetes kubernetes

K8S: convert "kubeadm init" command-line arguments to "--config" YAML


1. Accorindg to the official documentation:

It’s possible to configure kubeadm init with a configuration file instead of command line flags, and some more advanced features may only be available as configuration file options. This file is passed with the --config option.

The default configuration can be printed out using the kubeadm config print command.

It is recommended that you migrate your old v1beta1 configuration to v1beta2 using the kubeadm config migrate command.

During kubeadm init, kubeadm uploads the ClusterConfiguration object to your cluster in a ConfigMap called kubeadm-config in the kube-system namespace. This configuration is then read during kubeadm join, kubeadm reset and kubeadm upgrade. To view this ConfigMap call kubeadm config view.

You can use kubeadm config print to print the default configuration and kubeadm config migrate to convert your old configuration files to a newer version. kubeadm config images list and kubeadm config images pull can be used to list and pull the images that kubeadm requires.

Subnets are defined by --pod-network-cidr argument in kubeadm OR by a config file such as the example below below:

apiVersion: kubeadm.k8s.io/v1alpha3kind: InitConfigurationapi:  advertiseAddress: 0.0.0.0  bindPort: 6443kubernetesVersion: v1.12.1---apiVersion: kubeadm.k8s.io/v1alpha3kind: ClusterConfigurationnetworking:  podSubnet: 192.168.0.0/24

2. I was not able to find anything like this in the official documentation nor in other sources.

You instead can use kube-controller-manager to pass that kind of configuration.

Please let me know if that helped.