If you are using Macbook, start from here:
##install virtualbox
<https://www.virtualbox.org/wiki/Downloads>

## install ubuntu iso
<https://releases.ubuntu.com/18.04.5/ubuntu-18.04.5-live-server-amd64.iso>
setting->network
set the vm with two adapter one is nat which will get an IP automatically, one is host adapter which need create extra ip
check the vbox interface on host starting with 192.168.x.x, choose one ip in same range
if you copy the image from others, when importing the image, please remember to create the 2nd adaptor and and change the nic name in netplan and restart

cat /etc/netplan/00-installer-config.yaml

network: ethernets: enp0s3: dhcp4: true enp0s8: dhcp4: no addresses: - 192.168.34.2/24 version: 2

netplan apply

## ssh to your virtual machine. and follow below instructure.
If you are not using Macbook, prepare a Linux OS and follow below instructure.

# install kubernetes by kubeadm
<https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/>

## Installing runtime 
<https://docs.docker.com/engine/install/ubuntu/>

### Update the apt package index and install packages to allow apt to use a repository over HTTPS:

$ sudo apt-get update

$ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common

### Add Docker’s official GPG key:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

### Add Docker repositry

$ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"


### Update the apt package index, and install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:

$ sudo apt-get update $ sudo apt-get install docker-ce docker-ce-cli containerd.io

## install kubernetes
### Installing kubeadm, kubelet and kubectl 

$ cat <<EOF > /etc/apt/sources.list.d/kubernetes.list deb http://mirrors.ustc.edu.cn/kubernetes/apt kubernetes-xenial main EOF

$ gpg --keyserver keyserver.ubuntu.com --recv-keys BA07F4FB $ gpg --export --armor BA07F4FB | sudo apt-key add -

$ sudo apt-get update $ sudo apt-get install -y kubelet kubeadm kubectl $ sudo apt-mark hold kubelet kubeadm kubectl

### kubeadm init

$ kubeadm init \ --image-repository registry.aliyuncs.com/google_containers \ --kubernetes-version v1.19.3 \ --apiserver-advertise-address=192.168.34.2


### copy kubeconfig

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

### untaint master

$ kubectl taint nodes --all node-role.kubernetes.io/master-


### join other node

$ kubeadm join 192.168.2.116:6443 --token oig5z4.hofxyadrsfwhzxa9 \ --discovery-token-ca-cert-hash sha256:98172da8c89c09a176eb9e543e7decbc3a0dedf2c1a5ed16d83d16cb04e22513


## install cilium

helm install cilium cilium/cilium --version 1.9.1 \ --namespace kube-system \ --set kubeProxyReplacement=strict \ --set k8sServiceHost=192.168.34.2 \ --set k8sServicePort=6443


## install calico cni plugin
<https://docs.projectcalico.org/getting-started/kubernetes/quickstart>

$ kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml $ kubectl create -f https://docs.projectcalico.org/manifests/custom-resources.yaml


for i in kubectl api-resources | grep true | awk '{print \\$1}'; do echo $i;kubectl get $i -n rook-ceph; done