<p>I am trying to setup an IPv6 kubernetes cluster. I have two IPv6 interfaces and one docker interface (172.17.0.1). The docker interface is setup by docker itself.</p>

<pre><code>kahou@kahou-master:~$ ip a
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens192: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:af:1d:25 brd ff:ff:ff:ff:ff:ff
    inet6 2001:420:293:242d:250:56ff:feaf:1d25/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 2591949sec preferred_lft 604749sec
    inet6 fe80::250:56ff:feaf:1d25/64 scope link
       valid_lft forever preferred_lft forever
3: ens224: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:af:a5:15 brd ff:ff:ff:ff:ff:ff
    inet6 2000::250:56ff:feaf:a515/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 2591933sec preferred_lft 604733sec
    inet6 2000::3/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:feaf:a515/64 scope link
       valid_lft forever preferred_lft forever
4: docker0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:53:f2:46:8c brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
5: tunl0@NONE: &lt;NOARP,UP,LOWER_UP&gt; mtu 1440 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ipip 0.0.0.0 brd 0.0.0.0
</code></pre>

<p>When I initialize my cluster thru kubeadm, all the hostnetwork pods IP are using the docker IP addresses:</p>

<pre><code>etcd-kahou-master                          1/1     Running             0          177m   172.17.0.1   kahou-master   &lt;none&gt;
kube-apiserver-kahou-master                1/1     Running             0          177m   172.17.0.1   kahou-master   &lt;none&gt;
kube-controller-manager-kahou-master       1/1     Running             0          177m   172.17.0.1   kahou-master   &lt;none&gt;
kube-proxy-pnq7g                           1/1     Running             0          178m   172.17.0.1   kahou-master   &lt;none&gt;
kube-scheduler-kahou-master                1/1     Running             0          177m   172.17.0.1   kahou-master   &lt;none&gt;
</code></pre>

<p>Is it possible to tell kubeadm which interface I use during the installation?</p>

<p>Below is my api-server call (generated by kubeadm)</p>

<pre><code>kube-apiserver --authorization-mode=Node,RBAC --bind-address=2001:420:293:242d:250:56ff:feaf:1d25 --service-cluster-ip-range=fd03::/112 --advertise-address=2001:420:293:242d:250:56ff:feaf:1d25 --allow-privileged=true --client-ca-file=/etc/kubernetes/pki/ca.crt --enable-admission-plugins=NodeRestriction --enable-bootstrap-token-auth=true --etcd-cafile=/etc/kubernetes/pki/etcd/ca.crt --etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.crt --etcd-keyfile=/etc/kubernetes/pki/apiserver-etcd-client.key --etcd-servers=https://127.0.0.1:2379 --insecure-port=0 --kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt --kubelet-client-key=/etc/kubernetes/pki/apiserver-kubelet-client.key --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --proxy-client-cert-file=/etc/kubernetes/pki/front-proxy-client.crt --proxy-client-key-file=/etc/kubernetes/pki/front-proxy-client.key --requestheader-allowed-names=front-proxy-client --requestheader-client-ca-file=/etc/kubernetes/pki/front-proxy-ca.crt --requestheader-extra-headers-prefix=X-Remote-Extra- --requestheader-group-headers=X-Remote-Group --requestheader-username-headers=X-Remote-User --secure-port=6443 --service-account-key-file=/etc/kubernetes/pki/sa.pub --tls-cert-file=/etc/kubernetes/pki/apiserver.crt --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
</code></pre>

<p>This is my kubeadm config file:</p>

<pre><code>apiVersion: kubeadm.k8s.io/v1alpha2
kind: MasterConfiguration
api:
  advertiseAddress: 2001:420:293:242d:250:56ff:feaf:1d25
apiServerExtraArgs:
  bind-address: 2001:420:293:242d:250:56ff:feaf:1d25
  service-cluster-ip-range: fd03::/112
controllerManagerExtraArgs:
  node-cidr-mask-size: "96"
  cluster-cidr: fd02::/80
  service-cluster-ip-range: fd03::/112
networking:
  serviceSubnet: fd03::/112
nodeRegistration:
  node-ip: 2001:420:293:242d:250:56ff:feaf:1d25
</code></pre>

<p>A helpful note for configuring <code>node-ip</code> to be passed on to kubelet via kubeadm config file:
according to <a href="https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta1" rel="nofollow noreferrer">https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta1</a> and some experimentation, it should be under <code>kubeletExtraArgs</code> of the <code>nodeRegistration</code> section (example using IP from your config file): </p>

<pre><code>apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
nodeRegistration:
  kubeletExtraArgs:
    node-ip: 2001:420:293:242d:250:56ff:feaf:1d25
</code></pre>
