diff --git a/roles/kubernetes/master/tasks/main.yml b/roles/kubernetes/master/tasks/main.yml index f6955f689..6426a0e0d 100644 --- a/roles/kubernetes/master/tasks/main.yml +++ b/roles/kubernetes/master/tasks/main.yml @@ -47,7 +47,7 @@ - name: wait for the apiserver to be running (pulling image and running container) wait_for: - port: 8080 + port: "{{kube_apiserver_insecure_port}}" delay: 10 - name: install required python module 'httplib2' diff --git a/roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2 b/roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2 index 37f65357b..940ec1ace 100644 --- a/roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2 +++ b/roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2 @@ -21,6 +21,7 @@ spec: - --tls-private-key-file={{ kube_cert_dir }}/apiserver-key.pem - --service-account-key-file={{ kube_cert_dir }}/apiserver-key.pem - --secure-port={{ kube_apiserver_port }} + - --insecure-port={{ kube_apiserver_insecure_port }} {% if kube_api_runtime_config is defined %} {% for conf in kube_api_runtime_config %} - --runtime-config={{ conf }} diff --git a/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 b/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 index 32c52e7d9..e921bc846 100644 --- a/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 +++ b/roles/kubernetes/node/templates/manifests/kube-proxy.manifest.j2 @@ -13,9 +13,9 @@ spec: - proxy - --v={{ kube_log_level | default('2') }} {% if inventory_hostname in groups['kube-master'] %} - - --master=http://127.0.0.1:8080 + - --master=http://127.0.0.1:{{kube_apiserver_insecure_port}} {% else %} - - --master=https://{{ groups['kube-master'][0] }}:{{kube_apiserver_port }} + - --master=https://{{ groups['kube-master'][0] }}:{{kube_apiserver_port }} - --kubeconfig=/etc/kubernetes/node-kubeconfig.yaml {% endif %} securityContext: