-
- Visit the Kubernetes Engine page in the Google Cloud Platform Console.
- Create or select a project.
- Wait for the API and related services to be enabled.
docker-machine create --driver virtualbox default
docker-machine env default
eval "$(docker-machine env default)"
gcloud components install kubectl
export PROJECT_ID="$(gcloud config get-value project -q)"
docker build -t gcr.io/${PROJECT_ID}/badgeyay:v1 .
(Build Container Image)gcloud docker -- push gcr.io/${PROJECT_ID}/badgeyay:v1
(Push Container Image)gcloud container clusters create badgeyay-cluster --num-nodes=3
(Create Container cluster)kubectl run badgeyay-web --image=gcr.io/${PROJECT_ID}/badgeyay:v1 --port 4200
(Deploy your application)kubectl expose deployment badgeyay-web --type=LoadBalancer --port 80 --target-port 4200
(Expose deployment over the Internet)kubectl get service
- Copy the External-IP from the showed list corresponding to your cluster's name and run it in your browser.