I need to initialize my kubernetes cluster using a kubeadm config file due to some extra arguments that I need to pass, which are not directly available to kubeadm init
.
I did create a config file and it works fine. I went throgh the documentation of the kubeadm config file but still not able to get which option is equivalent to the command line flag --apiserver-advertise-address
My kubeadm version is 1.15.7
This is my current config: Commented out lines are the options which I already tried but dosen't seem to work.
#apiVersion: kubeadm.k8s.io/v1beta2
#kind: InitConfiguration
#APIEndpoint:
# advertiseAddress: "192.168.224.22"
# bindPort: 6443
#controlPlaneEndpoint: "192.168.224.22:6443"
apiServer:
advertiseAddress: "192.168.224.22"
extraArgs:
authorization-mode: Node,RBAC
# advertise-address: 192.168.224.22
authentication-token-webhook-config-file: /webhook/webhook-config.yaml
extraVolumes:
- name: "webhook-conf"
hostPath: "/webhook/"
mountPath: "/webhook/"
readOnly: true
pathType: DirectoryOrCreate
timeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta2
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controllerManager: {}
dns:
type: CoreDNS
etcd:
local:
dataDir: /var/lib/etcd
#APIEndpoint:
# advertiseAddress: "192.168.224.22"
# bindPort: 6443
imageRepository: k8s.gcr.io
kind: ClusterConfiguration
kubernetesVersion: v1.15.10
networking:
# advertiseAddress: "192.168.224.22"
dnsDomain: cluster.local
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/12
scheduler: {}
This is what I'm trying to configure.