On the controller node after kubeadm init
is complete:
KUBECONFIG=/etc/kubernetes/admin.conf kubectl apply -f kube-router-kubeadm-all-features.yaml
KUBECONFIG=/etc/kubernetes/admin.conf kubectl -n kube-system delete ds kube-proxy
docker run --privileged --net=host gcr.io/google_containers/kube-proxy-amd64:v1.7.3 kube-proxy --cleanup-iptables
We mount the configMap that contains kube-proxy's kubeconfig to our kube-router pod for API connectivity.
volumeMounts:
- name: lib-modules
mountPath: /lib/modules
readOnly: true
- name: cni
mountPath: /etc/cni/net.d
- name: kubeconfig
mountPath: /var/lib/kube-router
readOnly: true
# [...]
volumes:
- hostPath:
path: /lib/modules
name: lib-modules
- hostPath:
path: /etc/cni/net.d
name: cni
- name: kubeconfig
configMap:
name: kube-proxy
items:
- key: kubeconfig.conf
path: kubeconfig