> For the complete documentation index, see [llms.txt](https://repo.4pfsec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://repo.4pfsec.com/google-cloud-computing/cloud-computing-fundamentals/kubernetes-engine-qwik-start.md).

# Kubernetes Engine: Qwik Start

## Overview

[Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/) (GKE) provides a managed environment for deploying, managing, and scaling your containerized applications using Google infrastructure. The Kubernetes Engine environment consists of multiple machines (specifically [Compute Engine](https://cloud.google.com/compute) instances) grouped to form a [container cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). In this lab, you get hands-on practice with container creation and application deployment with GKE.

## Lab

### Set a default compute zone <a href="#step4" id="step4"></a>

Select [your zone](https://cloud.google.com/compute/docs/regions-zones/#available) wisely! Enter the following command to set your zone!

```
gcloud config set compute/zone asia-southeast1-a
```

![](/files/KC0L1A3D0480nhRDYQLN)

### Creating a GKE Cluster

A [cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture) consists of at least one **cluster master** machine and multiple worker machines called **nodes**. Nodes are [Compute Engine virtual machine (VM) instances](https://cloud.google.com/compute/docs/instances/) that run the Kubernetes processes necessary to make them part of the cluster.

Enter the following command to create a cluster.

```
gcloud container clusters create neeishere
```

![](/files/QmuDoda3Sej0uIUEnyx1)

### Get authentication credentials for the cluster <a href="#step6" id="step6"></a>

```
gcloud container clusters get-credentials [CLUSTER-NAME]
```

![](/files/YJYOJEWwGe37p9yHrEJn)

### Deploy an application to the cluster <a href="#step7" id="step7"></a>

Deploying a test application as shown below.

```
kubectl create deployment hello-server --image=gcr.io/google-samples/hello-app:1.0
```

Creating a Kubernetes Service which lets us expose our application to external traffic:

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

* `--port` specifies the port that the container exposes.
* `type="LoadBalancer"` creates a Compute Engine load balancer for your container.

![](/files/P40YCxO7EDhPJ7N7pWLf)

Inspect Service as shown below to get the public IP:

```
kubectl get service
```

![](/files/Bdg93ANPbslzpAokl3Ym)

![](/files/OhDm62CtRSuEXKRGeGTm)

### Deleting the cluster <a href="#step8" id="step8"></a>

```
gcloud container clusters delete neeishere
```

![](/files/pfNRRa8t3tlFe7o3DGOR)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://repo.4pfsec.com/google-cloud-computing/cloud-computing-fundamentals/kubernetes-engine-qwik-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
