mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 05:30:26 +00:00
Set external hostname in local-up-cluster
If we set --external-hostname, then the api server does not look in the CloudProviderOptions.DefaultExternalHost method. While we are at it, let's log an info message, so if there is a failure the operator gets a hint that they can use --external-hostname to bypass the lookup in the cloud provider. This will enable us to set the CLOUD_PROVIDER to openstack for example and not have to really run api server inside a openstack vm.
This commit is contained in:
@@ -200,6 +200,7 @@ API_SECURE_PORT=${API_SECURE_PORT:-6443}
|
||||
API_HOST=${API_HOST:-localhost}
|
||||
API_HOST_IP=${API_HOST_IP:-"127.0.0.1"}
|
||||
API_BIND_ADDR=${API_BIND_ADDR:-"0.0.0.0"}
|
||||
EXTERNAL_HOSTNAME=${EXTERNAL_HOSTNAME:-localhost}
|
||||
|
||||
KUBELET_HOST=${KUBELET_HOST:-"127.0.0.1"}
|
||||
# By default only allow CORS for requests on localhost
|
||||
@@ -513,6 +514,7 @@ function start_apiserver {
|
||||
--etcd-servers="http://${ETCD_HOST}:${ETCD_PORT}" \
|
||||
--service-cluster-ip-range="${SERVICE_CLUSTER_IP_RANGE}" \
|
||||
--feature-gates="${FEATURE_GATES}" \
|
||||
--external-hostname="${EXTERNAL_HOSTNAME}" \
|
||||
--cloud-provider="${CLOUD_PROVIDER}" \
|
||||
--cloud-config="${CLOUD_CONFIG}" \
|
||||
--requestheader-username-headers=X-Remote-User \
|
||||
|
Reference in New Issue
Block a user