Merge pull request #19 from priitliivak/master

Custom options for kubeadm init
This commit is contained in:
Jeff Geerling 2018-09-28 09:37:10 -05:00 committed by GitHub
commit 7808b23758
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,10 @@ Whether the particular server will serve as a Kubernetes `master` (default) or `
Extra args to pass to `kubelet` during startup. E.g. to allow `kubelet` to start up even if there is swap is enabled on your server, set this to: `"--fail-swap-on=false"`. Or to specify the node-ip advertised by `kubelet`, set this to `"--node-ip={{ ansible_host }}"`. Extra args to pass to `kubelet` during startup. E.g. to allow `kubelet` to start up even if there is swap is enabled on your server, set this to: `"--fail-swap-on=false"`. Or to specify the node-ip advertised by `kubelet`, set this to `"--node-ip={{ ansible_host }}"`.
kubernetes_kubeadm_init_extra_opts: ""
Extra args to pass to `kubeadm init` during K8s control plane initialization. E.g. to specify extra Subject Alternative Names for API server certificate, set this to: `"--apiserver-cert-extra-sans my-custom.host"`
kubernetes_allow_pods_on_master: true kubernetes_allow_pods_on_master: true
Whether to remove the taint that denies pods from being deployed to the Kubernetes master. If you have a single-node cluster, this should definitely be `True`. Otherwise, set to `False` if you want a dedicated Kubernetes master which doesn't run any other pods. Whether to remove the taint that denies pods from being deployed to the Kubernetes master. If you have a single-node cluster, this should definitely be `True`. Otherwise, set to `False` if you want a dedicated Kubernetes master which doesn't run any other pods.

View File

@ -15,6 +15,7 @@ kubernetes_version_rhel_package: '1.11.3'
kubernetes_role: master kubernetes_role: master
kubernetes_kubelet_extra_args: "" kubernetes_kubelet_extra_args: ""
kubernetes_kubeadm_init_extra_opts: ""
kubernetes_allow_pods_on_master: true kubernetes_allow_pods_on_master: true
kubernetes_enable_web_ui: true kubernetes_enable_web_ui: true

View File

@ -6,6 +6,8 @@
--apiserver-advertise-address={{ kubernetes_apiserver_advertise_address | default(ansible_default_ipv4.address) }} --apiserver-advertise-address={{ kubernetes_apiserver_advertise_address | default(ansible_default_ipv4.address) }}
--kubernetes-version {{ kubernetes_version_kubeadm }} --kubernetes-version {{ kubernetes_version_kubeadm }}
--ignore-preflight-errors={{ kubernetes_ignore_preflight_errors }} --ignore-preflight-errors={{ kubernetes_ignore_preflight_errors }}
{{ kubernetes_kubeadm_init_extra_opts }}
register: kubeadmin_init register: kubeadmin_init
failed_when: false failed_when: false
when: kubernetes_init_stat.stat.exists == false when: kubernetes_init_stat.stat.exists == false