Last active
October 29, 2018 10:24
-
-
Save vaibhav-walia/61e41421d1e033ce46b3df6ebf83f520 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt update | |
#install curl | |
apt install -y curl | |
#install a few prerequisite packages which let apt use packages over HTTPS | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
#add the GPG key for the official Docker repository | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
#Add the Docker repository to APT sources | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | |
#update the package database with the Docker packages from the newly added repo | |
apt update | |
#install Docker | |
apt install -y docker-ce | |
#virtualbox | |
apt-get install -y virtualbox | |
#install minikube | |
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.30.0/minikube-linux-amd64 && chmod +x minikube && sudo cp minikube /usr/local/bin/ && rm minikube | |
#install kubectl | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/linux/amd64/kubectl | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
#start minikube | |
sudo minikube start --vm-driver=none | |
# sudo kubectl run pet1 --image=vwalia/docker-petclinic:1.0 --port=8080 | |
sudo kubectl run pet2 --image=vwalia/docker-petclinic:1.0 --port=8080 | |
sudo kubectl run pet3 --image=vwalia/docker-petclinic:1.0 --port=8080 | |
# sudo kubectl expose deployment/pet1 --type="NodePort" --port=8080 --target-port=32132 | |
# export NODE_PORT1=$(kubectl get services/pet1 -o go-template='{{(index .spec.ports 0).nodePort}}') | |
sudo kubectl expose deployment/pet2 --type="NodePort" --port=8081 --target-port=8080 | |
export NODE_PORT2=$(kubectl get services/pet2 -o go-template='{{(index .spec.ports 0).nodePort}}') | |
sudo kubectl expose deployment/pet3 --type="NodePort" --port=8082 --target-port=8080 | |
export NODE_PORT3=$(kubectl get services/pet3 -o go-template='{{(index .spec.ports 0).nodePort}}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment