šŸ¤“ Kubernetes Scenarios

k8s logo

Local Computer
Local Computer
Skaffold
Skaffold
synced files
synced files
Cloud VM
Cloud VM
Node
Node
Pod
Pod
Pod
Pod
Pod
Pod
Pod
Pod
changes
changes
update a pod
update a pod
Scenario 1 synced files
Scenario 1 synced files
Local Computer
Local Computer
Skaffold
Skaffold
unsynced files
unsynced files
changes
changes
update a pod
update a pod
Scenario 2 unsynced files
Scenario 2 unsynced files
Cloud Build
Cloud Build
changed files
changed files
Dockerfile
Dockerfile
Docker builder
Docker builder
Docker Image
Docker Image
changed files
changed files
Dockerfile
Dockerfile
Rebuild Docker Image
Rebuild Docker Image
Cloud VM
Cloud VM
Node
Node
Deployment
Deployment
Pod
Pod
Pod
Pod
Pod
Pod
Local Computer
Local Computer
Kubectl
Kubectl
Context 1
Context 1
Context 2
Context 2
Cluster 1
Cluster 1
Cluster 2
Cluster 2
google cloud SDK
google cloud SDK
google cloud SDK
run Local Docker
google cloud SDK…
Do not run Local Docker
Do not run Local Doc…
Close Docker Desktop
Close Docker Desktop
gcloud components install kubectl
gcloud components install kubectl
Run Local Docker
Run Local Docker
gcloud container cluster get-credentials <cluster_name>
gcloud container cluster get-credentials <cluster_name>
Created google cloud project
Created google cloud project
Enable google cloudĀ  Build
Tools -> Cloud Build
Enable google cloudĀ  Build…
Update skaffold.yml to google cloud build
Update skaffold.yml…
Setup ingress-nginx on cloud cluster
kubernetes.github.io/ingress-nginx
Setup ingress-nginx on cloud cluster…
UpdateĀ domainĀ inĀ hosts to remote cluster
UpdateĀ domainĀ inĀ hosts to remote clust…
restart Skaffold
skaffold dev
restart Skaffold…
skaffold.yaml

build:
#Ā  local:
#Ā  Ā  push: false
Ā  googleCloudBuild:
Ā  Ā  projectId: xxx
Ā  artifacts:
Ā  Ā  - image: us.gcr.io/xxx/auth


auth-depl.yaml
image: xxx
skaffold.yaml…
k8s context on cloud gke_xxx
kubectl apply XXX

GCE-GKE
kubectl apply XXX
k8s context on cloud gke_xxx…
Internet
Internet
Cloud Provider (AWS GoogleCloud Azure)
Cloud Provider (AWS GoogleCloud Azure)
Load Balancer

Networking -> Network services -> load balancing
IP
Load Balancer…
Ingress Controller
router rules
Ingress Controller…
Pod
Pod
Pod
Pod
Pod
Pod
Tools -> Cloud Build -> History
Tools -> Cloud Build -> History
Viewer does not support full SVG 1.1

Zane Zheng
Zane Zheng
Full Stack (Ruby on Rails) / Devops

An Full Stack / Devops with JS, Ruby, Linux, JAMStack, MicroServices.