Google Kubernetes Engine
1. Create a GKE project
k8s-osc
- k8s-305606
2. kubernetes Engine enable
3. Install Google Cloud SDK and Choosing a shell
- https://cloud.google.com/sdk/docs/install
After installing Cloud SDK, install the kubectl command-line tool by running the following command:
gcloud components install kubectl
4. Setting a default project
gcloud config set project k8s-305606
- k8s-305606 (project Id)
5. Create cluster
gcloud config set compute/zone asia-northeast3gcloud container clusters create dev --num-nodes=2gcloud container clusters create prod --num-nodes=2
gcloud container clusters delete cluster-name
# gcloud container clusters delete dev
https://cloud.google.com/kubernetes-engine/docs/quickstart#local-shell
Create Namespace
kubectl create namespace api
kubectl create namespace front
kubectl create namespace db
projectcontour
kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
prod-gke
skaffold run -f skaffold.yaml -p gke -t v1
gcr
gcloud services enable containerregistry.googleapis.com
gcloud auth configure-docker
gcloud components install docker-credential-gcr
docker-credential-gcr configure-docker
- asia.gcr.io/k8s-305606/k8s-board-fe:v1
- asia.gcr.io/k8s-305606/k8s-board-api:v1
GKE Price Kubernetes Engine API USD 0.10/hour