Skip to content

Kubernetes

GunSik Choi edited this page Feb 21, 2016 · 12 revisions

Installing in AWS

gcloud container clusters create hello-world \
     --num-nodes 1 \
     --machine-type g1-small
gcloud compute instances list
kubectl run hello-node --image=gcr.io/${PROJECT_ID}/hello-node:v1 --port=8080
kubectl expose rc hello-node --type="LoadBalancer"
kubectl scale rc hello-node --replicas=3

kubectl get nodes
kubectl get pods
kubectl get services
kubectl get replicationcontrollers

kubectl run my-nginx --image=nginx --replicas=3 --port=80
kubectl scale rc my-nginx --replicas=2

kubectl delete services hello-node
kubectl delete rc hello-node
gcloud container clusters delete hello-world

Reference

Clone this wiki locally