Kubernetes Engine Flashcards
Kubernetes Engine Cluster Modes
1) Standard: user-self managed cluster
2) Autopilot: GKE managed cluster, reduce operational cost
Gcloud container clusters create
Create Kubernetes cluster
gcloud container clusters get-credentials
connecting to Kubernetes cluster
kubectl create deployment
deploying microservice to the cluster
kubectl get deployment
reveal status of the microservice
kubectl expose deployment
expose microservice external IP
kubectl get service
checking status of the service, gives out
1) cluster internal IP
2) external IP
3) port used for the service
4) type expose of the service
kubectl scale deployment
scale number of instances service in the cluster
gcloud container clusters resize
increase number of nodes in Kubernetes cluster
Command to autoscale microservice
kubectl autoscale deployment –max = –cpu-percent = 70
Command to autoscale Kubernetes existing cluster
gcloud containers clusters update –enable-autoscaling –min-nodes= 1 –max-nodes=10
command to create autoscale cluster
gcloud containers clusters create –enable-autoscaling –min-nodes=1 –max-nodes=10
kubectl create configmap
create additional configuration to microservice
kubectl create secret generic
create password configuration
Master node
Manage cluster. Have 4 components:
1) API server
2) Scheduler
3) Control manager
4) etcd