Skip to content

Instantly share code, notes, and snippets.

@Qquanwei
Forked from carlosedp/install_container_service.sh
Last active August 26, 2019 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qquanwei/a429d7e8ee1c4209cab0e81ab4735425 to your computer and use it in GitHub Desktop.
Save Qquanwei/a429d7e8ee1c4209cab0e81ab4735425 to your computer and use it in GitHub Desktop.
Install Container services (Docker/Kubernetes) on Debian/Ubuntu
#!/bin/bash
echo "Container Linux installation script"
echo "This will install:"
echo " - Docker Community Edition"
echo " - Docker Compose"
echo " - Kubernetes: kubeadm, kubelet and kubectl"
echo ""
set -xeo pipefail
apt-get update -y
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository \
"deb https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable"
curl -s https://raw.githubusercontent.com/Qquanwei/install-rancher-repo/master/google.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update -y
apt-get install -y docker-ce docker-compose kubelet kubeadm kubectl
usermod -aG docker ${USER}
snap install helm --classic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment