mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Append first address from --api-advertise-addresses
to kube-apiserver
flags
This commit is contained in:
parent
4747e1cc1d
commit
0cb54e7eb2
@ -266,6 +266,10 @@ func getComponentCommand(component string, s *kubeadmapi.MasterConfiguration) (c
|
||||
command = append(command, baseFlags[component]...)
|
||||
|
||||
if component == apiServer {
|
||||
// Use first address we are given
|
||||
if len(s.API.AdvertiseAddresses) > 0 {
|
||||
command = append(command, fmt.Sprintf("--advertise-address=%s", s.API.AdvertiseAddresses[0]))
|
||||
}
|
||||
// Check if the user decided to use an external etcd cluster
|
||||
if len(s.Etcd.Endpoints) > 0 {
|
||||
command = append(command, fmt.Sprintf("--etcd-servers=%s", strings.Join(s.Etcd.Endpoints, ",")))
|
||||
|
Loading…
Reference in New Issue
Block a user