diff --git a/roles/kubernetes/client/tasks/main.yml b/roles/kubernetes/client/tasks/main.yml index 8c7fba34f..0fa2de233 100644 --- a/roles/kubernetes/client/tasks/main.yml +++ b/roles/kubernetes/client/tasks/main.yml @@ -47,10 +47,16 @@ port: "{{ kube_apiserver_port }}" timeout: 180 +- name: Create external_kubeconfig dir + file: + path: "{{ kube_config_dir }}/external_kubeconfig" + mode: "0750" + state: directory + when: kubeconfig_localhost + # NOTE(mattymo): Please forgive this workaround - name: Generate admin kubeconfig with external api endpoint # noqa 302 shell: >- - mkdir -p {{ kube_config_dir }}/external_kubeconfig && {{ bin_dir }}/kubeadm init phase kubeconfig admin