diff --git a/README.md b/README.md index 47c449f..dfdaa9b 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ Extra args to pass to `kubelet` during startup. E.g. to allow `kubelet` to start 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_join_command_extra_opts: "" + +Extra args to pass to the generated `kubeadm join` command during K8s node initialization. E.g. to ignore certain preflight errors like swap being enabled, set this to: `--ignore-preflight-errors=Swap` + 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. diff --git a/defaults/main.yml b/defaults/main.yml index 6e78ce2..a336b31 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -16,6 +16,7 @@ kubernetes_role: master kubernetes_kubelet_extra_args: "" kubernetes_kubeadm_init_extra_opts: "" +kubernetes_join_command_extra_opts: "" kubernetes_allow_pods_on_master: true kubernetes_enable_web_ui: true diff --git a/tasks/main.yml b/tasks/main.yml index fe6d999..e90420a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -44,7 +44,9 @@ - name: Set the kubeadm join command globally. set_fact: - kubernetes_join_command: "{{ kubernetes_join_command_result.stdout }}" + kubernetes_join_command: > + {{ kubernetes_join_command_result.stdout }} + {{ kubernetes_join_command_extra_opts }} when: kubernetes_join_command_result.stdout is defined delegate_to: "{{ item }}" delegate_facts: true