Skip to content

Commit 113ab74

Browse files
author
Jake Sanders
committed
add option to set the value of the apiserver's insecure port
1 parent 0772f85 commit 113ab74

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cluster/gce/gci/configure-helper.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,6 +1593,10 @@ function start-kube-apiserver {
15931593
params+=" --etcd-servers-overrides=${ETCD_SERVERS_OVERRIDES:-}"
15941594
fi
15951595
params+=" --secure-port=443"
1596+
if [[ "${ENABLE_APISERVER_INSECURE_PORT:-true}" != "true" ]]; then
1597+
# Default is :8080
1598+
params+=" --insecure-port=0"
1599+
fi
15961600
params+=" --tls-cert-file=${APISERVER_SERVER_CERT_PATH}"
15971601
params+=" --tls-private-key-file=${APISERVER_SERVER_KEY_PATH}"
15981602
params+=" --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname"

cluster/gce/manifests/kube-apiserver.manifest

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,19 @@
3232
{{container_env}}
3333
"livenessProbe": {
3434
"httpGet": {
35+
"scheme": "HTTPS",
3536
"host": "127.0.0.1",
36-
"port": 8080,
37+
"port": {{secure_port}},
3738
"path": "/healthz?exclude=etcd"
3839
},
3940
"initialDelaySeconds": {{liveness_probe_initial_delay}},
4041
"timeoutSeconds": 15
4142
},
4243
"readinessProbe": {
4344
"httpGet": {
45+
"scheme": "HTTPS",
4446
"host": "127.0.0.1",
45-
"port": 8080,
47+
"port": {{secure_port}},
4648
"path": "/healthz"
4749
},
4850
"periodSeconds": 1,

0 commit comments

Comments
 (0)