Currently, I have been involved in Container Native Applications Development environment setup for which I was trying to setup Kubernetes locally using One Master Node and One Worker Node. Below is the detail of activities and problem I am facing in this context -
Background
- Oracle Tutorial Followed- https://docs.oracle.com/cd/E52668_01/E88884/html/pref.html
- OS used for Master and Worker Node: Oracle Enterprise Linux 7.3
What I have achieved
- Everything has gone smoothly as per the tutorial and I am able to set up the master node on one VM (192.168.0.90- OEL7.3). I have been able to setup master node using
kubeadm-setup.sh up
- Kubernetes dashboard is accessible via localhost using the link provided in the tutorial. Additionally, I am able to login via generated Token. Finally, the dashboard is available and I am able to navigate through respective links available there.
- I have applied 'Weave Net' on master node for CNI [It was not specified in the tutorial] after running [kubeadm-setup.sh up]
- After this, I have installed kubeadm on worker node VM (192.168.0.91- OEL7.3) and joined this worker node to master node using the below command
kubeadm-setup.sh join --token 46f948.4e95645dfce53da9 192.168.0.90:6443 --discovery-token-ca-cert-hash \ sha256:2b35fa310b9adf3182cca6e2efbf59f7ecba543582044fab294f65d58ae7841d
[This command was available immediately after success of kubeadm-setup.sh including token and sha256 keys]
Problems
Problem 1:
I have restarted the master node VM (192.168.0.90- OEL7.3) and tried to start the kubernetes cluster using normal user(oracle) considering - firewall off, Swap off but not able to start the kubernetes cluster using [kubeadm init]. It hangs out. Although [ kubectl cluster-info ] gives below output
-------------------------------------------------------------------------------------------
-bash-4.2$ kubectl cluster-info
Kubernetes master is running at https://192.168.0.90:6443
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
The connection to the server 192.168.0.90:6443 was refused - did you specify the right host or port?
-------------------------------------------------------------------------------------------
LOGS ATTACHED-
a. kubeadm_init_error_log.txt
b. kubelet-master-node-log.txt
c. journalctl-master-log.txt
However, If I run the command- [kubeadm-setup.sh up] again then everything goes smoothly and I am able to access the dashboard as earlier but everything got reset viz. token, keys, cluster etc.
Problem 2
I have created another VM for worker node VM (192.168.0.90- OEL7.3) and followed the steps of 'Oracle Tutorial' to install kubernetes using kubeadm.
- kubelet is not running.
- If join this node to master node VM (192.168.0.90- OEL7.3), success message comes and 'kubectl get nodes' shows two nodes on master but the worker node is always in ‘Not Ready’ state i.e. CNI applied Wave Net is not working for this (although wave net is running successfully on master node).
LOGS ATTACHED-
a. kubelet-worker-node-log.txt
Please help.