https://linuxconfig.org/how-to-install-kubernetes-on-ubuntu-18-04-bionic-beaver-linux
> apt-get install nfs-kernel-server
> apt-get install nfs-common
atlantis.cs.uga.edu:/space /space nfs auto 0 0
> apt-get install docker.io
> systemctl enable docker
> systemctl start docker
> curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add
> apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
> apt install kubeadm
https://kubernetes.io/docs/setup/production-environment/container-runtimes/
> cat > /etc/docker/daemon.json <<EOF
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF
> systemctl restart docker
Teyla - master
> kubeadm init --pod-network-cidr=172.19.55.0/24
Your Kubernetes control-plane has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
> mkdir -p $HOME/.kube
> sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
> sudo chown $(id -u):$(id -g) $HOME/.kube/config
You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
https://kubernetes.io/docs/concepts/cluster-administration/addons/
For example, to use flannel as the network provider, use the following URL to its yml file:
Or Weave Net:
kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
Or Calico:
- https://docs.projectcalico.org/manifests/calico.yaml
- https://docs.projectcalico.org/manifests/calico-etcd.yaml
See the Calico configuration links:
- https://docs.projectcalico.org/getting-started/kubernetes/quickstart
- https://docs.projectcalico.org/getting-started/kubernetes/self-managed-onprem/onpremises#install-calico-with-kubernetes-api-datastore-50-nodes-or-less
- https://docs.projectcalico.org/getting-started/kubernetes/installation/config-options
Then you can join any number of worker nodes by running the following on each as root:
> kubeadm join 172.19.55.31:6443 --token ua6hak.9rea2k48h3wc7vgj \
--discovery-token-ca-cert-hash sha256:8438d69c1266fcb854e03d9e988b596ffdd180a93cbc460c8fc5d90ec9e295ee
Pretty straightforward. Just run the command on the master:
curl -sfL https://get.k3s.io | sh -
Once that succeeds (hopefully), run the following on the workers:
curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -
where K3S_URL
is the master node, and K3S_TOKEN
is the contents of /var/lib/rancher/k3s/server/node-token
on the master node.
One script for the master, one for the workers: https://rancher.com/docs/k3s/latest/en/installation/uninstall/
k3s can also be simply shut down via the script /usr/local/bin/k3s-killall.sh
Install JupyterHub https://zero-to-jupyterhub.readthedocs.io/en/latest/setup-jupyterhub/index.html
- Rancher blog post specifically for JuputerHub, but seems like it has problems https://rancher.com/blog/2020/ai-meets-kubernetes
Kubeflow https://rancher.com/blog/2020/introduction-to-machine-learning-pipeline
Interesting. rancher/rancher#21926 (comment)