Skip to content

Commit

Permalink
Update Vagrantfile with docker install
Browse files Browse the repository at this point in the history
  • Loading branch information
Sehgal, Rohit committed Sep 25, 2020
1 parent 72dab36 commit 6ace2cb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is not exclusive guide to learn Kubernetes from scratch, rahter this is jus
## This post talks about:
1. [**Setting up Kubernetes cluster in VM**](#Setting-up-Kubernetes-cluster-in-VM) : 1 VM cluster
- Spining up a virtual machine with [**Vagrant**](https://www.vagrantup.com/docs/installation) : 2GB RAM + 2CPU cores(Atleat)
- [Understanding](#What-are-kube*):
- [Understanding](#What-are-kube):
- **kubeadm**
- **kubelet**
- **kubectl**
Expand Down
25 changes: 25 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ Vagrant.configure("2") do |config|
# Setting up Kubernetes

config.vm.provision "shell", inline: <<-SHELL
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io
# Verification
docker --version
# Version 19.03
systemctl status docker
# Ensure that the status is "active (running)"
# You may have to press q to quit
systemctl stop docker
systemctl start docker
systemctl restart docker
# Install Kubernetes
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
Expand Down

0 comments on commit 6ace2cb

Please sign in to comment.