Skip to content

Instantly share code, notes, and snippets.

@krsna1729
Created May 22, 2019 14:56
I was trying to bring up k8s using kubeadm to use a non-default route interface
apiVersion: kubeadm.k8s.io/v1beta1
kind: InitConfiguration
nodeRegistration:
  criSocket: /var/run/crio/crio.sock
  taints: []
  name: k8s-clr-01
  kubeletExtraArgs:
    node-ip: "192.52.100.11"
localAPIEndpoint:
  advertiseAddress: "192.52.100.11"
  bindPort: 6443
---
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
networking:
  dnsDomain: cluster.local
  podSubnet: 10.244.0.0/16
  serviceSubnet: 10.96.0.0/12
controlPlaneEndpoint: "192.52.100.11:6443"
$ cat /etc/hosts
127.0.0.1 localhost clr-01
192.52.100.11 k8s-clr-01

$ hostname -f
localhost
$ ip route
default via 192.168.121.1 dev enp0s8 proto dhcp src 192.168.121.167 metric 1024
192.52.100.0/24 dev enp0s9 proto kernel scope link src 192.52.100.11
192.168.121.0/24 dev enp0s8 proto kernel scope link src 192.168.121.167
192.168.121.1 dev enp0s8 proto dhcp scope link src 192.168.121.167 metric 1024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment