-
Overview
- Google Kubernetes Engine provides a managed environment for deploying, managing, and scaling containerized applications using Google infrastructure
- The GKE environment consists of multiple Google Compute Engine machines grouped together to form a cluster
- GKE clusters are powered by the Kubernetes open source cluster management system
- Kubernetes provides the mechanisms for interacting with clusters
- Kubernetes commands and resources can be used to deploy and manage applications, perform administration tasks and set policies, and monitor the health of deployed workloads
- Kubernetes draws on the same design principles that run popular Google services and provides the same benefits: automatic management, monitoring and liveness probes for application containers, automatic scaling, rolling updates, and more
- Applications running on Google Cloud clusters use technology based on Google's 15+ years of experience running production workloads in containers
-
GKE clusters advanced cluster management features
- Cloud load-balancing for Compute Engine instances
- Node pools to designate subsets of nodes within a cluster for additional flexibility
- Automatic scaling of cluster's node instance count
- Automatic upgrades for cluster's node software
- Node auto-repair to maintain node health and availability
- Logging and monitoring for visibility into cluster operations
- GKE cluster masters are automatically upgraded to run new versions of Kubernetes as those versions become stable, enabling users to take advantage of newer features from the open source Kubernetes projec
- Users can opt-in to newer versions of Kubernetes than those scheduled for automatic upgrades by manually initiating a master upgrade
- Kubernetes Alpha features are available in special GKE alpha clusters
- GKE works with containerized applications: applications packaged into hardware independent, isolated user-space instances, for example by using Docker
- GKE and Kubernetes containers, whether for applications or batch jobs, are collectively called workloads
- Before deploying a workload on a GKE cluster, it must be packaged into a container
- Google Cloud Platform provides continuous integration and continuous delivery tools to help build and serve application containers
- Google Cloud Build can be used to build container images (such as Docker) from a variety of source code repositories, and Google Container Registry to store and serve container images
-
Architecture
- A cluster consists of at least one cluster master and multiple worker machines called nodes
- The cluster master and node machines run the Kubernetes cluster orchestration system
- A cluster is the foundation of Google Kubernetes Engine
- Kubernetes objects that represent containerized applications run on top of a cluster
- The cluster master runs the Kubernetes control plane processes, including the Kubernetes API server, scheduler, and core resource controllers
- The master's lifecycle is managed by Google Kubernetes Engine when a cluster is created or deleted
- Google Kubernetes Engine performs upgrades to the Kubernetes version running on the cluster master automatically
- Google Kubernetes Engine upgrades can be manually requested if required earlier than the automatic schedule
- All interactions with the cluster are done via Kubernetes API calls
- The master runs the Kubernetes API Server process that handles Kubernetes API calls
- Kubernetes API calls can be made directly via HTTP/gRPC
- Kubernetes API calls can be made indirectly, by running commands from the Kubernetes command-line client (kubectl)
- Kubernetes API calls can be made indirectly by interacting with the UI in the Cloud Console
- The cluster master's API server process is the hub for all communication for the cluster
- All internal cluster processes such as the cluster nodes, system and components, application controllers act as clients of the API server
- The Kubernetes API server is the single "source of truth" for the entire cluster
- The cluster master is responsible for deciding what runs on all of the cluster's nodes
- The cluster master is responsible for scheduling workloads, like containerized applications, and managing the workloads' lifecycle, scaling, and upgrades
- The master also manages network and storage resources for those workloads
- The master and nodes also communicate using Kubernetes APIs
- When a cluster is created or updated, container images for the Kubernetes software running on the masters (and nodes) are pulled from the gcr.io container registry
- In the event of a zonal or regional outage of the gcr.io container registry, Google may redirect requests to a zone or region not affected by the outage
- Google Cloud status dashboard can be used to check the current status of Google Cloud services
- A cluster typically has one or more nodes that run containerized applications and other workloads
- Individual nodes are Compute Engine VM instances that GKE creates when a cluster is created
- Each node is managed from the master, which receives updates on each node's self-reported status
- Users can exercise some manual control over the node lifecycle, or have GKE perform automatic repairs and automatic upgrades on the cluster's nodes
- A node runs the services necessary to support the Docker containers that make up a cluster's workloads
- Node services include the Docker runtime and the Kubernetes node agent (kubelet) which communicates with the master and is responsible for starting and running Docker containers scheduled on that node
- In GKE, there are a number of special containers that run as per-node agents to provide functionality such as log collection and intra-cluster network connectivity
- Each node is of a standard Compute Engine machine type
- Users can select a different machine type when they create a cluster
- Each node runs a specialized OS image for running containers
- Users can specify which OS image the clusters and node pools use
- A baseline minimum CPU platform for nodes or node pools in cluster can be specified when a cluster is created
- Choosing a specific CPU platform can be advantageous for advanced or compute-intensive workloads
- Some of a node's resources required to run the GKE and Kubernetes node components are necessary to make that node function as part of a cluster
- As larger machine types tend to run more containers (and by extension, more Pods)
- The amount of resources that GKE reserves for Kubernetes components scales upward for larger machines
- Windows Server nodes also require more resources than a typical Linux node
- The nodes need the extra resources to account for running the Windows OS and for the Windows Server components that can't run in containers
- Request for resources can be made for Pods or to limit resource usage
-
Responsibilities
- Google is responsible for the control plane (including the master VMs, API server, other components on the master VMs, and etcd)
- Google is responsible for the Kubernetes distribution
- Google is responsible for the nodes' operating system
- Configurations related to these items are generally not available for customers to audit or modify in GKE
- Clients are still responsible for upgrading the nodes that run workloads, and the workloads themselves
- Clients can generally audit and remediate any recommendations to these components