ref https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/
- install kubeflow and docker installed
- setup flannel as described https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#tabs-pod-install-3
- set single cluster machine
sudo apt install kubectl kubeadm=1.15.10-00 kubectl=1.15.10-00 kubelet=1.15.10-00
kubeadm init --control-plane-endpoint kube1.labs --pod-network-cidr=10.244.0.0/16 --kubernetes-version v1.15
# add under section command to /etc/kubernetes/manifests/kube-apiserver.yaml
# to support thrustworthy tokens
- --service-account-issuer=kubernetes.default.svc
- --service-account-signing-key-file=/etc/kubernetes/pki/sa.key
#flannel
echo 'net.bridge.bridge-nf-call-iptables=1' | sudo tee -a /etc/sysctl.conf
sudo sysctl net.bridge.bridge-nf-call-iptables=1
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/2140ac876ef134e0ed5af15c65e414cf26827915/Documentation/kube-flannel.yml
# allow master to run as cluster
kubectl taint nodes --all node-role.kubernetes.io/master-
# add kubectl config
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
# Create manually storage, TODO see NFS or block storage as alternative
kubectl apply -f https://gist.githubusercontent.com/muka/f91aa4afbbbe5cfb7cbbb7e19109b896/raw/4afbee28ff3f5d2ee8befbafcd15649fa10805a7/storage.yml
# Create istion ingress
# https://istio.io/docs/tasks/traffic-management/ingress/ingress-control/
# set external ip to node host
kubectl patch svc -n istio-system istio-ingressgateway -p '{"spec":{"externalIPs":["192.168.1.14"]}}'
export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].nodePort}')
export INGRESS_HOST=$(kubectl get po -l istio=ingressgateway -n istio-system -o jsonpath='{.items[0].status.hostIP}')
kubectl apply -f https://gist.github.com/muka/f91aa4afbbbe5cfb7cbbb7e19109b896/raw/4afbee28ff3f5d2ee8befbafcd15649fa10805a7/istio_httpbin.yml