<p>I'm trying to set up a Kubernetes master on an IP other than the one assigned to the default interface. These are the changes I made to my <code>kubeadm-config.yml</code> :</p>
<pre class="lang-yaml prettyprint-override"><code>---
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
controlPlaneEndpoint: x.x.x.x
apiServer:
  extraArgs:
    advertise-address: x.x.x.x
  certSANs:
    - x.x.x.x
etcd:
  local:
    dataDir: /var/lib/etcd
    extraArgs:
      advertise-client-urls: https://x.x.x.x:2379
      initial-advertise-peer-urls: https://x.x.x.x:2380
      initial-cluster: my-hostname=https://x.x.x.x:2380
      listen-client-urls: https://127.0.0.1:2379,https://x.x.x.x:2379
      listen-peer-urls: https://x.x.x.x:2380
      initial-cluster-state: new
    serverCertSANs:
      - x.x.x.x
    peerCertSANs:
      - x.x.x.x
</code></pre>
<p>Where <code>x.x.x.x</code> is the non-default IP.
Everything seems to be set correctly, except for the liveness probe of the api-server. At <code>/etc/kubernetes/manifests/kube-apiserver.yaml</code> I still see</p>
<pre class="lang-yaml prettyprint-override"><code>livenessProbe:
  failureThreshold: 8
  httpGet:
    host: y.y.y.y
    path: /healthz
    port: 6443
    scheme: HTTPS
</code></pre>
<p>Where <code>y.y.y.y</code> is the old IP.</p>
<p>Does anyone know what key I need to add to my <code>kubeadm-config.yml</code> to set this right?</p>
<p>Sam</p>

<p>Reproducing your configuration, I found out that the <code>InitConfiguration</code> part of <code>kubeadm-config</code> is required for that.</p>
<p>The following <code>kubeadm-config.yaml</code> part is supposed to instruct <code>kubeadm</code> to configure <code>kube-apiserver</code> according to your needs:</p>
<pre><code>---
kind: InitConfiguration
apiVersion: kubeadm.k8s.io/v1beta2
localAPIEndpoint:
  advertiseAddress: &quot;x.x.x.x&quot;
  bindPort: 6443

# the next section is optional, but could be useful also
nodeRegistration:
  kubeletExtraArgs:
    cgroup-driver: &quot;systemd&quot;
</code></pre>
<p>For the full details please read related GoDoc page:</p>
<ul>
<li><a href="https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2" rel="nofollow noreferrer">k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2</a></li>
</ul>
