Skip to content

Instantly share code, notes, and snippets.

Created January 29, 2018 10:17
What would you like to do?
Kubernetes installation
export DEBIAN_FRONTEND=noninteractive;
if [ "$(whoami)" != "root" ]; then
echo "$0: Permission denied"
exit 1;
# Install kubeadm
if [ -z "$(command -v kubeadm)" ]; then
echo "kubeadm installation"
apt-get update && apt-get install -y apt-transport-https
echo "deb kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
curl -s | apt-key add -
apt-get update && apt-get install -y kubelet kubeadm kubernetes-cni
# Start kubernetes cluster
systemctl restart kubelet
kubeadm init --pod-network-cidr=
mkdir -p ~/.kube && cp /etc/kubernetes/admin.conf ~/.kube/config
kubectl taint nodes --all
kubectl apply -f
# Install helm
if [ -z "$(command -v helm)" ]; then
curl -s | bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment