I am following with the answer here step 6th. To make my own local minikube
cluster of single master and 2 nodes
.
master
names minikube
.
$ kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.3", GitCommit:"721bfa751924da8d1680787490c54b9179b1fed0", GitTreeState:"clean", BuildDate:"2019-02-01T20:05:53Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
$ kubelet --version
Kubernetes v1.13.3
login to the minikube
console by
minikube ssh
Then check the ip addresses with ifconfig
$ ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:0E:E5:B4:9C
inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0
inet6 addr: fe80::42:eff:fee5:b49c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18727 errors:0 dropped:0 overruns:0 frame:0
TX packets:21337 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1621416 (1.5 MiB) TX bytes:6858635 (6.5 MiB)
eth0 Link encap:Ethernet HWaddr 08:00:27:04:9E:5F
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe04:9e5f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:139646 errors:0 dropped:0 overruns:0 frame:0
TX packets:11964 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:202559446 (193.1 MiB) TX bytes:996669 (973.3 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:10:7A:A5
inet addr:192.168.99.105 Bcast:192.168.99.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe10:7aa5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2317 errors:0 dropped:0 overruns:0 frame:0
TX packets:2231 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:197781 (193.1 KiB) TX bytes:199788 (195.1 KiB)
Therefore my minikube
ip address is 192.168.99.105
On my VM
node. I have checked that they are using the same network.
Networks are
NAT
Host-only Adapter Names:
vboxnet0`
Here is the nmap
proof that no firewall against connection port
Execute the kubeadm join
to join the cluster.
If it get the exact output from cli. It is even worse. Because the command output is calling the localhost
and when it comes to the executor it means it calls itself which is wrong and therefore after execute it. Terminial will show me timeout error
kubeadm join 192.168.99.105:8443 --token 856tch.tpccuji4nnc2zq5g --discovery-token-ca-cert-hash sha256:cfbb7a0f9ed7fca018b45fdfecb753a88aec64d4e46b5ac9ceb6d04bbb0a46a6
kubeadm
show me localhost
back!
Surly I did not get any node
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready master 104m v1.13.3
Question:
How to let
kubeadm
follow my given ip address in the cli correctly?How to prevent
localhost
come back during the process?