Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config


Verify that your network is on the right network interface

Code Block
kubectl get pods -o wide --all-namespaces

NAMESPACE     NAME                               READY   STATUS    RESTARTS   AGE    IP          NODE       NOMINATED NODE   READINESS GATES
kube-system   coredns-86c58d9df4-8zk5t           0/1     Pending   0          2d3h   <none>      <none>     <none>           <none>
kube-system   coredns-86c58d9df4-tsftk           0/1     Pending   0          2d3h   <none>      <none>     <none>           <none>
kube-system   etcd-k8master                      1/1     Running   1          2d3h   10.0.3.15   k8master   <none>           <none>
kube-system   kube-apiserver-k8master            1/1     Running   1          2d3h   10.0.3.15   k8master   <none>           <none>
kube-system   kube-controller-manager-k8master   1/1     Running   1          2d3h   10.0.3.15   k8master   <none>           <none>
kube-system   kube-proxy-88gdq                   1/1     Running   1          2d3h   10.0.3.15   k8master   <none>           <none>
kube-system   kube-scheduler-k8master            1/1     Running   1          2d3h   10.0.3.15   k8master   <none>           <none>


The Ip should not be 10.0.3.xxx> mkdir -p $HOME/.kube
> sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
> sudo chown $(id -u):$(id -g) $HOME/.kube/config




Install Flannel Network Plugin

...

Code Block
sudo kubectl get nodes

NAME        STATUS   ROLES    AGE     VERSION
k8master    Ready    master   47h     v1.13.1
k8worker1   Ready    <none>   12m     v1.13.1
k8worker2   Ready    <none>   6m12s   v1.13.1


kubectl get pods --all-namespaces

NAMESPACE     NAME                               READY   STATUS    RESTARTS   AGE
kube-system   coredns-86c58d9df4-8zk5t           1/1     Running   READY2   STATUS    RESTARTS   AGE47h
kube-system   coredns-86c58d9df4-8zk5ttsftk           1/1     Running   2          47h
kube-system   coredns-86c58d9df4-tsftketcd-k8master                      1/1     Running   23          47h
kube-system   etcd-k8master kube-apiserver-k8master            1/1     Running   3          47h
kube-system   kube-controller-manager-k8master     1/1     Running   3          47h
kube-system   kube-flannel-ds-apiserver-k8master    amd64-fl5wp        1/1     Running   3          47h25m
kube-system   kube-flannel-controllerds-manager-k8masteramd64-k26xv        1/1     Running   30          47h5m4s
kube-system   kube-flannel-ds-amd64-fl5wpncg64        1/1     Running   31          25m11m
kube-system   kube-flannel-ds-amd64-k26xvproxy-88gdq                   1/1     Running   03          5m4s47h
kube-system   kube-flannel-ds-amd64-ncg64proxy-b6m4d                   1/1     Running   10          11m5m4s
kube-system   kube-proxy-88gdqnxwmh                   1/1     Running   31          47h11m
kube-system   kube-proxy-b6m4dscheduler-k8master            1/1     Running   3          47h

Now deploy something and verify it all works.


Install Some Example Pods

Code Block
> kubectl create -f https://kubernetes.io/examples/application/deployment.yaml
> kubectl get pods

NAME     1/1     Running   0          5m4s
kube-system   kube-proxy-nxwmh      READY   STATUS    RESTARTS   AGE
nginx-deployment-76bf4969df-hkmjp   1/1     Running   10          11m2m18s
kube-system   kube-scheduler-k8master      nginx-deployment-76bf4969df-x7f9h      1/1     Running   30          47h

...

2m18s






Install Dashboard

From the master node:

...

> ssh -L 8001:127.0.0.1:8001 test@192.168.56.100


Browse to:http://localhost:8001/

....


References

...