☁️
Cloud Computing
  • Introduction
  • Terminologies
    • Container
    • Kubernetes (K8s)
    • Serverless Computing
  • Services
    • Docker
    • Terraform
  • ☁️Cloud Computing Platforms
    • Google Cloud
      • Google Cloud Essentials
      • Management
        • Cloud IAM
      • Compute
        • Compute Engine
        • Kubernetes Engine
      • Resources
    • IBM Cloud
      • IBM Cloud Shell
      • Compute
      • Containers
      • Developer tools
      • Integration
      • Storage
      • Cloud Paks
    • Microsoft Azure
      • Compute
        • Functions
        • App Services
      • Networking
      • Storage
      • Web
      • Mobile
      • Databases
        • Cosmos DB
      • Analytics
      • AI + Machine Learning
      • Internet of things
      • Security
      • DevOps
      • Monitoring
      • Management and governance
      • Azure Stack
    • Amazon Web Services
    • Resources
  • Qwiklabs Challenge Labs
    • Create and Manage Cloud Resources
    • Deploy and Manage Cloud Environments with Google Cloud
    • Create ML Models with BigQuery ML
    • Insights from Data with BigQuery
    • Build a Website on Google Cloud
    • Build and Deploy a Docker Image to a Kubernetes Cluster
    • Build and Secure Networks in Google Cloud
    • Set Up and Configure a Cloud Environment in Google Cloud
    • Build and Optimize Data Warehouses with BigQuery: Challenge Lab
    • Scale Out and Update a Containerized Application on a Kubernetes Cluster
  • Whizlabs Challenge League
Powered by GitBook
On this page

Was this helpful?

  1. Cloud Computing Platforms
  2. Google Cloud
  3. Compute

Kubernetes Engine

Run containers and implement cloud-native applications powered by industry standards

When you run a GKE cluster, you also gain the benefit of advanced cluster management features that Google Cloud provides. These include:

  • Load balancing for Compute Engine instances

  • Node pools to designate subsets of nodes within a cluster for additional flexibility

  • Automatic scaling of your cluster's node instance count

  • Automatic upgrades for your cluster's node software

  • Node auto-repair to maintain node health and availability

  • Logging and Monitoring with Cloud Monitoring for visibility into your cluster

A cluster consists of at least one cluster master machine and multiple worker machines called nodes. Nodes are Compute Engine virtual machine (VM) instances that run the Kubernetes processes necessary to make them part of the cluster.

To create a cluster

gcloud container clusters create [CLUSTER-NAME]

After creating your cluster, you need authentication credentials to interact with it. To authenticate the cluster

gcloud container clusters get-credentials [CLUSTER-NAME]

To create a Kubernetes Service, which is a Kubernetes resource that lets you expose your application to external traffic

kubectl expose deployment hello-server \
--type=LoadBalancer \
--port 8080

In this command:

  • --port specifies the port that the container exposes.

  • type="LoadBalancer" creates a Compute Engine load balancer for your container.

To delete the cluster

gcloud container clusters delete [CLUSTER-NAME]

Commands

gcloud container clusters create learning-cluster
gcloud container clusters get-credentials learning-cluster
kubectl create deployment hello-server --image=gcr.io/google-samples/hello-app:1.0
kubectl expose deployment hello-server --type=LoadBalancer --port 8080
kubectl get service
gcloud container clusters delete learning-cluster
PreviousCompute EngineNextResources

Last updated 2 years ago

Was this helpful?

☁️