Skip to content
Snippets Groups Projects
Commit d31c040d authored by Sergii Golovatiuk's avatar Sergii Golovatiuk
Browse files

Change kube-api default port from 443 to 6443


Operator can specify any port for kube-api (6443 default) This helps in
case where some pods such as Ingress require 443 exclusively.

Closes: 820
Signed-off-by: default avatarSergii Golovatiuk <sgolovatiuk@mirantis.com>
parent 21d3d758
No related branches found
No related tags found
No related merge requests found
...@@ -61,8 +61,8 @@ listen kubernetes-apiserver-https ...@@ -61,8 +61,8 @@ listen kubernetes-apiserver-https
mode tcp mode tcp
timeout client 3h timeout client 3h
timeout server 3h timeout server 3h
server master1 <IP1>:443 server master1 <IP1>:6443
server master2 <IP2>:443 server master2 <IP2>:6443
balance roundrobin balance roundrobin
``` ```
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#loadbalancer_apiserver_localhost: true #loadbalancer_apiserver_localhost: true
## Local loadbalancer should use this port instead, if defined. ## Local loadbalancer should use this port instead, if defined.
## Defaults to kube_apiserver_port (443) ## Defaults to kube_apiserver_port (6443)
#nginx_kube_apiserver_port: 8443 #nginx_kube_apiserver_port: 8443
### OTHER OPTIONAL VARIABLES ### OTHER OPTIONAL VARIABLES
......
...@@ -76,7 +76,7 @@ kube_network_node_prefix: 24 ...@@ -76,7 +76,7 @@ kube_network_node_prefix: 24
# The port the API Server will be listening on. # The port the API Server will be listening on.
kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}" kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}"
kube_apiserver_port: 443 # (https) kube_apiserver_port: 6443 # (https)
kube_apiserver_insecure_port: 8080 # (http) kube_apiserver_insecure_port: 8080 # (http)
# DNS configuration. # DNS configuration.
......
...@@ -91,7 +91,7 @@ kube_network_node_prefix: 24 ...@@ -91,7 +91,7 @@ kube_network_node_prefix: 24
# The port the API Server will be listening on. # The port the API Server will be listening on.
kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}" kube_apiserver_ip: "{{ kube_service_addresses|ipaddr('net')|ipaddr(1)|ipaddr('address') }}"
kube_apiserver_port: 443 # (https) kube_apiserver_port: 6443 # (https)
kube_apiserver_insecure_port: 8080 # (http) kube_apiserver_insecure_port: 8080 # (http)
# Path used to store Docker data # Path used to store Docker data
......
...@@ -45,7 +45,7 @@ spec: ...@@ -45,7 +45,7 @@ spec:
# changed so long as it is used in conjunction with # changed so long as it is used in conjunction with
# CONFIGURE_ETC_HOSTS="true". # CONFIGURE_ETC_HOSTS="true".
- name: K8S_API - name: K8S_API
value: "https://kubernetes.default:443" value: "https://kubernetes.default:{{ kube_apiserver_port }}"
# Configure /etc/hosts within the container to resolve # Configure /etc/hosts within the container to resolve
# the kubernetes.default Service to the correct clusterIP # the kubernetes.default Service to the correct clusterIP
# using the environment provided by the kubelet. # using the environment provided by the kubelet.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
tasks: tasks:
- name: Check the API servers are responding - name: Check the API servers are responding
uri: uri:
url: "https://{{ansible_ssh_host}}/api/v1" url: "https://{{ access_ip | default(ansible_default_ipv4.address) }}:{{ kube_apiserver_port }}/api/v1"
user: kube user: kube
password: changeme password: changeme
validate_certs: no validate_certs: no
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment