Create a Kubernetes cluster

Check my progress

/ 20

Configure and Install Jenkins

Check my progress

/ 20

Create the production and canary deployments

Check my progress

/ 30

Build for the 'new-feature' branch

Check my progress

/ 10

Deploying a canary release

Check my progress

/ 10

Deploying to production

Check my progress

/ 10

This lab may incorporate AI tools to support your learning.
This content is not yet optimized for mobile devices.
For the best experience, please visit us on a desktop computer using a link sent by email.

GSP051

Google Cloud self-paced labs

Overview

In this lab, you learn how to set up a continuous delivery pipeline with Jenkins on Kubernetes Engine. Jenkins is the go-to automation server used by developers who frequently integrate their code in a shared repository. The solution you build in this lab is similar to the following diagram:

Jenkins and Kubernetes architecture

In the Cloud Architecture Center, see Jenkins on Kubernetes Engine to learn more about running Jenkins on Kubernetes.

What you'll learn

In this lab, you learn how to perform the following tasks:

  • Provision a Jenkins application into a Kubernetes Engine cluster.
  • Set up your Jenkins application using Helm Package Manager.
  • Explore the features of a Jenkins application.
  • Create and exercise a Jenkins pipeline.

Prerequisites

This is an advanced-level lab. Before taking it, you should be comfortable with at least the basics of shell programming, Kubernetes, and Jenkins. Here are some labs that can get you up to speed:

When you are prepared, continue to the next section to learn more about Kubernetes, Jenkins, and continuous delivery.

What is Kubernetes Engine?

Kubernetes Engine is Google Cloud's hosted version of Kubernetes—a powerful cluster manager and orchestration system for containers. Kubernetes is an open source project that can run on many different environments—from laptops to high-availability multi-node clusters; from virtual machines to bare metal. As mentioned before, Kubernetes apps run in containers—these are lightweight applications bundled with all the necessary dependencies and libraries to run them. This underlying structure makes Kubernetes applications highly available, secure, and quick to deploy—an ideal framework for cloud developers.

What is Jenkins?

Jenkins is an open-source automation server that lets you flexibly orchestrate your build, test, and deployment pipelines. Jenkins allows developers to iterate quickly on projects without worrying about overhead issues that can stem from continuous delivery.

What is Continuous Delivery / Continuous Deployment?

When you need to set up a continuous delivery (CD) pipeline, deploying Jenkins on Kubernetes Engine provides important benefits over a standard VM-based deployment.

When your build process uses containers, one virtual host can run jobs on multiple operating systems. Kubernetes Engine provides ephemeral build executors—the cluster uses these executors only when builds are actively running, which leaves resources for other cluster tasks such as batch processing jobs. Another benefit of ephemeral build executors is speed—they launch in a matter of seconds.

Kubernetes Engine also comes pre-equipped with Google's global load balancer, which you can use to automate web traffic routing to your instances. The load balancer handles SSL termination and uses a global IP address that's configured with Google's backbone network—coupled with your web front, this load balancer always sets your users on the fastest possible path to an application instance.

Now that you've learned a little bit about Kubernetes, Jenkins, and how the two interact in a CD pipeline, it's time to go build one.

Setup and requirements

Before you click the Start Lab button

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.

This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.

To complete this lab, you need:

  • Access to a standard internet browser (Chrome browser recommended).
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
  • Time to complete the lab—remember, once you start, you cannot pause a lab.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.

How to start your lab and sign in to the Google Cloud console

  1. Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the right is the Lab setup and access panel with the following:

    • The Open Google Cloud console button
    • The temporary credentials (username and password) that you must use for this lab
    • Other information, if needed, to step through this lab

    Note that the lab timer is located near the top of the page, showing the remaining time.

  2. Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).

    The lab spins up resources, and then opens another tab that shows the Sign in page.

    Tip: Arrange the tabs in separate windows, side-by-side.

    Note: If you see the Choose an account dialog, click Use Another Account.
  3. If necessary, copy the Username below and paste it into the Sign in dialog.

    {{{user_0.username | "Username"}}}

    You can also find the Username in the Lab setup and access panel.

  4. Click Next.

  5. Copy the Password below and paste it into the Welcome dialog.

    {{{user_0.password | "Password"}}}

    You can also find the Password in the Lab setup and access panel.

  6. Click Next.

    Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges.
  7. Click through the subsequent pages:

    • Accept the terms and conditions.
    • Do not add recovery options or two-factor authentication (because this is a temporary account).
    • Do not sign up for free trials.

After a few moments, the Google Cloud console opens in this tab.

Note: To access Google Cloud products and services, click the Navigation menu or type the service or product name in the Search field. Navigation menu icon and Search field

Activate Cloud Shell

Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.

  1. Click Activate Cloud Shell Activate Cloud Shell icon at the top of the Google Cloud console.

  2. Click through the following windows:

    • Continue through the Cloud Shell information window.
    • Authorize Cloud Shell to use your credentials to make Google Cloud API calls.

When you are connected, you are already authenticated, and the project is set to your Project_ID, . The output contains a line that declares the Project_ID for this session:

Your Cloud Platform project in this session is set to {{{project_0.project_id | "PROJECT_ID"}}}

gcloud is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.

  1. (Optional) You can list the active account name with this command:
gcloud auth list
  1. Click Authorize.

Output:

ACTIVE: * ACCOUNT: {{{user_0.username | "ACCOUNT"}}} To set the active account, run: $ gcloud config set account `ACCOUNT`
  1. (Optional) You can list the project ID with this command:
gcloud config list project

Output:

[core] project = {{{project_0.project_id | "PROJECT_ID"}}} Note: For full documentation of gcloud, in Google Cloud, refer to the gcloud CLI overview guide.

Task 1. Download the source code and create the Kubernetes cluster

In this task, you download the source code for this lab, create a Kubernetes cluster, and enable Jenkins to access Google Cloud services and Google Artifact Registry.

Download the source code

  1. To get set up, open a new session in Cloud Shell and run the following command to set your zone :
gcloud config set compute/zone {{{project_0.default_zone}}}
  1. Copy and extract the lab's sample code:
gcloud storage cp gs://spls/gsp051/continuous-deployment-on-kubernetes.zip . unzip continuous-deployment-on-kubernetes.zip
  1. Change to the project directory:
cd continuous-deployment-on-kubernetes

Create a Kubernetes cluster

  1. Run the following command to provision a Kubernetes cluster:
gcloud container clusters create jenkins-cd \ --num-nodes 2 \ --machine-type e2-standard-2 \ --scopes "https://www.googleapis.com/auth/source.read_write,cloud-platform"

This step can take several minutes to finish. The extra scopes enable Jenkins to access Google Cloud services and Google Artifact Registry.

Click Check my progress to verify the objective. If you have successfully created a Kubernetes cluster, you see an assessment score.

Create a Kubernetes cluster (zone: )
  1. Before continuing, confirm that your cluster is running by running the following command:
gcloud container clusters list

Get credentials for your cluster

  1. Get the credentials for your cluster:
gcloud container clusters get-credentials jenkins-cd
  1. Kubernetes Engine uses these credentials to access your newly provisioned cluster—confirm that you can connect to it by running the following command:
kubectl cluster-info

Task 2. Install and connect to Jenkins

Helm is a package manager that helps you configure and deploy Kubernetes applications. In this task, you use Helm to install Jenkins from the Charts repository and sign in to the Jenkins interface.

Set up Helm

  1. Add Helm's stable chart repository:
helm repo add jenkins https://charts.jenkins.io
  1. Update the chart repository:
helm repo update

Install and configure Jenkins

When you install Jenkins, you can use a values file as a template to provide values that are necessary for setup.

You use a custom values file to automatically configure your Kubernetes Cloud and add the following necessary plugins:

  • Kubernetes:latest
  • Workflow-multibranch:latest
  • Git:latest
  • Configuration-as-code:latest
  • Google-oauth-plugin:latest
  • Google-source-plugin:latest
  • Google-storage-plugin:latest

This allows Jenkins to connect to your cluster and your Google Cloud project.

  1. Use the Helm CLI to deploy the chart with your configuration settings:
helm install cd jenkins/jenkins -f jenkins/values.yaml --wait

This command might take a few minutes to finish.

Click Check my progress to verify the objective. If you have successfully configured a Jenkins chart, you see an assessment score.

Configure and install Jenkins
  1. After that command finishes, run the following command to confirm that the Jenkins pod is in the Running state and the container is in the READY state:
kubectl get pods

Example output:

NAME READY STATUS RESTARTS AGE cd-jenkins-7c786475dd-vbhg4 2/2 Running 0 1m
  1. Configure the Jenkins service account to be able to deploy to the cluster:
kubectl create clusterrolebinding jenkins-deploy --clusterrole=cluster-admin --serviceaccount=default:cd-jenkins

You should receive the following output:

clusterrolebinding.rbac.authorization.k8s.io/jenkins-deploy created
  1. Run the following command to set up port forwarding to the Jenkins UI from Cloud Shell:
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/component=jenkins-master" -l "app.kubernetes.io/instance=cd" -o jsonpath="{.items[0].metadata.name}") kubectl port-forward $POD_NAME 8080:8080 >> /dev/null &
  1. Run the following command to confirm that Helm created the Jenkins Services:
kubectl get svc

Example output:

NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE cd-jenkins 10.35.249.67 8080/TCP 3h cd-jenkins-agent 10.35.248.1 50000/TCP 3h kubernetes 10.35.240.1 443/TCP 9h

You use the Kubernetes Plugin so that Kubernetes automatically launches builder nodes as necessary when the Jenkins controller requests them. When builder nodes finish their work, they automatically turn down and Kubernetes returns their resources to the cluster's resource pool.

Notice that this service exposes ports 8080 and 50000 for any pods that match the selector. This exposes the Jenkins web UI and builder/agent registration ports within the Kubernetes cluster. Additionally, the jenkins-ui service uses a ClusterIP address so that it is not accessible from outside the cluster.

Connect to Jenkins

Retrieve the admin password and sign in to the Jenkins interface.

  1. The Jenkins chart automatically creates an admin password for you. To retrieve it, run:
printf $(kubectl get secret cd-jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo
  1. To open the Jenkins user interface, in the Cloud Shell toolbar, click Web Preview (Web Preview icon) > Preview on port 8080.

  2. If Jenkins prompts you to sign in, then enter admin as the username and your auto-generated password.

You now have Jenkins set up in your Kubernetes cluster! Jenkins drives your automated CI/CD pipelines in the next sections.

Task 3. Deploy the sample application

In this task, you review the sample application, gceme, and deploy it into production and canary environments.

Understand the application

Developers wrote the gceme application in Go, and its source code is in the repository's sample-app directory. When you run the gceme binary on a Compute Engine instance, the app displays the instance's metadata in an info card.

The application mimics a microservice by supporting two operation modes:

  • Backend mode: gceme listens on port 8080 and returns Compute Engine instance metadata in JSON format.
  • Frontend mode: gceme queries the backend gceme service and renders the resulting JSON in the user interface.

gceme architecture diagram

Deploy the application

Deploy the application into two different environments:

  • Production: The live site that your users access.
  • Canary: A smaller-capacity site that receives only a percentage of your user traffic. Use this environment to validate your software with live traffic before you release it to all your users.
  1. In Cloud Shell, navigate to the sample application directory:
cd sample-app
  1. Create the Kubernetes namespace to logically isolate the deployment:
kubectl create ns production
  1. Create the production and canary deployments, and the services using the kubectl apply commands:
kubectl apply -f k8s/production -n production kubectl apply -f k8s/canary -n production kubectl apply -f k8s/services -n production

Click Check my progress to verify the objective. If you have successfully created deployments, you see an assessment score.

Create the production and canary deployments

By default, the deployment runs only one replica of the frontend. Use the kubectl scale command to ensure that at least 4 replicas run at all times.

  1. Scale up the production environment frontends by running the following command:
kubectl scale deployment gceme-frontend-production -n production --replicas 4
  1. Run the following command to confirm that you have 5 pods running for the frontend—4 for production traffic and 1 for canary releases (changes to the canary release affect only 1 out of 5 (20%) of users):
kubectl get pods -n production -l app=gceme -l role=frontend
  1. Run the following command to confirm that you have 2 pods for the backend, 1 for production and 1 for canary:
kubectl get pods -n production -l app=gceme -l role=backend
  1. Retrieve the external IP for the production services:
kubectl get service gceme-frontend -n production Note: It can take several minutes before you see the load balancer external IP address.

Example output:

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE gceme-frontend LoadBalancer 10.79.241.131 104.196.110.46 80/TCP 5h

Copy the EXTERNAL-IP value from the output and paste it into a browser tab to view the info card—you should see a similar page:

Backend that serviced this request

  1. Store the frontend service load balancer IP in an environment variable for use later:
export FRONTEND_SERVICE_IP=$(kubectl get -o jsonpath="{.status.loadBalancer.ingress[0].ip}" --namespace=production services gceme-frontend)
  1. Open the frontend external IP address in your browser to confirm that both services are working.

  2. Check the version output of the service by running the following command (it should return 1.0.0):

curl http://$FRONTEND_SERVICE_IP/version

You have successfully deployed the sample application! Next, you set up a pipeline to deploy your changes continuously and reliably.

Task 4. Create the Jenkins pipeline

In this task, you set up a Git repository on your dedicated Git server and create the Jenkins pipeline:

  • Push the sample application source code to the Git server
  • Add your service account credentials to Jenkins
  • Configure Jenkins Cloud for Kubernetes
  • Create the Jenkins Multibranch Pipeline job

Push the sample app source code to the Git server

  1. In Cloud Shell, retrieve the external IP address of your Git server:
export GIT_SERVER_IP=$(gcloud compute instances describe git-server --zone={{{project_0.default_zone}}} --format='get(networkInterfaces[0].accessConfigs[0].natIP)') echo "Git Server IP: ${GIT_SERVER_IP}"
  1. Initialize the sample-app directory as a Git repository:
cd ~/continuous-deployment-on-kubernetes/sample-app git init git config --global user.email "student@qwiklabs.net" git config --global user.name "Student" git branch -m master
  1. Add the remote repository pointing to your self-hosted Git server:
git remote add origin http://giteaadmin:GiteaPassword123@${GIT_SERVER_IP}:3000/giteaadmin/sample-app.git
  1. Add, commit, and push the files to the master branch:
git add . git commit -m "Initial commit" git push -u origin master

Add your service account credentials

Configure your credentials to allow Jenkins to access the cluster and deploy resources.

  1. In the Jenkins navigation menu, click Manage Jenkins.
Note: You might see several administrative warning banners at the top of the Manage Jenkins page (such as reverse proxy, unsecure setup, or empty URL warnings). You can safely ignore these banners for this lab and go to the configuration sections.
  1. In the Security section, click Credentials.

  2. Under Stores scoped to Jenkins, click System.

Credentials page

  1. Click Global credentials (unrestricted).

  2. Click Add Credentials.

  3. For Kind, select Google Service Account from metadata, and then click Next.

  4. For ID, enter your Project ID (), and then click Create.

Note: You can find your Project ID in the lab's Connection Details panel.

Jenkins adds the global credentials.

Global credentials (unrestricted) page

Configure Jenkins Cloud for Kubernetes

  1. In the Jenkins navigation menu, click Manage Jenkins, and then in the System Configuration section, click Clouds.
  2. Click New cloud.
  3. For Cloud name, enter kubernetes, select Kubernetes for Type, and then click Create.
  4. For Jenkins URL, enter http://cd-jenkins:8080.
  5. For Jenkins tunnel, enter cd-jenkins-agent:50000.
  6. Click Save.

Create the Jenkins job

In the Jenkins interface, configure a Multibranch Pipeline job:

  1. In the Jenkins navigation menu, click Jenkins > New Item.

  2. Enter the item name sample-app, select Multibranch Pipeline, and then click OK.

  3. In the Branch Sources section, select Git from the Add source menu.

  4. For Project Repository, enter the clone URL of your repository:

http://{{{project_0.startup_script.git_server_ip}}}:3000/giteaadmin/sample-app.git
  1. For Credentials, leave the setting as - none -.

  2. In the Scan Multibranch Pipeline Triggers section, select the Periodically if not otherwise run checkbox, and set Interval to 1 minute.

  3. Leave all other options at their defaults, and click Save.

After you complete these steps, a job named Branch indexing runs. This meta-job identifies the branches in your repository and verifies whether changes have occurred in existing branches. When you click sample-app in the breadcrumb navigation, the master job appears.

Note: The first run of the master job might fail until you make a few code changes in the next task.

You have created a Jenkins pipeline. Next, you create the development environment for continuous integration.

Task 5. Create and deploy the development environment

Development branches are a set of environments that your developers use to test their code changes before submitting them for integration into the live site. These environments are scaled-down versions of your application, and you must deploy them using the same mechanisms as the live environment.

Create a development branch

To create a development environment from a feature branch, you push the branch to the Git server and let Jenkins deploy your environment.

Note: If you see errors in Cloud Shell, press CTRL+C and then run the following command.
  • Create a development branch:
git checkout -b new-feature

Modify the pipeline definition

The Jenkinsfile that defines the pipeline uses the Jenkins Pipeline Groovy syntax. Using a Jenkinsfile lets you express an entire build pipeline in a single file that lives alongside your source code. Pipelines support features such as parallelization and manual user approval.

For the pipeline to work as expected, you must create an Artifact Registry repository for your container images and modify the Jenkinsfile to set your project ID and Artifact Registry image path.

  1. Create an Artifact Registry Docker repository to store your container images:
gcloud artifacts repositories create my-repository \ --repository-format=docker \ --location={{{project_0.default_region}}}
  1. Open the Jenkinsfile in your terminal editor, such as vi:
vi Jenkinsfile
  1. Enter insert mode in the editor:
i
  1. Replace REPLACE_WITH_YOUR_PROJECT_ID with your PROJECT_ID. (You can find your Project ID in the lab's Connection Details panel, or by running gcloud config get-value project.)

  2. Confirm that CLUSTER_ZONE is set to (you can also verify this value by running gcloud config get compute/zone), add REGION set to and REPO set to my-repository, and update IMAGE_TAG to target Artifact Registry:

PROJECT = "REPLACE_WITH_YOUR_PROJECT_ID" APP_NAME = "gceme" FE_SVC_NAME = "${APP_NAME}-frontend" CLUSTER = "jenkins-cd" CLUSTER_ZONE = "{{{project_0.default_zone}}}" REGION = "{{{project_0.default_region}}}" REPO = "my-repository" IMAGE_TAG = "${REGION}-docker.pkg.dev/${PROJECT}/${REPO}/${APP_NAME}:${env.BRANCH_NAME}.${env.BUILD_NUMBER}" JENKINS_CRED = "${PROJECT}"
  1. To save the Jenkinsfile in vi, press ESC, type the following command, and press ENTER:
:wq

Modify the site

To demonstrate changing the application, change the gceme cards from blue to orange.

  1. Open html.go:
vi html.go
  1. Enter insert mode in the editor:
i
  1. Replace both instances of <div class="card blue"> with the following HTML:
  1. To save the html.go file, press ESC, type the following command, and press ENTER:
:wq
  1. Open main.go:
vi main.go
  1. Enter insert mode in the editor:
i
  1. Locate the line that defines the version:
const version string = "1.0.0"

Update it to the following value:

const version string = "2.0.0"
  1. To save the main.go file, press ESC, type the following command, and press ENTER:
:wq

Start deployment

Deploy your development environment and verify the running version.

  1. Commit and push your changes:
git add Jenkinsfile html.go main.go git commit -m "Version 2.0.0" git push origin new-feature

This command starts a build of your development environment.

  1. In the Jenkins interface, navigate to the sample-app job:

    • In the breadcrumb navigation, click Dashboard.
    • Click sample-app.
    • If the new-feature branch does not appear immediately under the Branches tab, then click Scan Multibranch Pipeline Now in the navigation menu.
  2. Click new-feature.

  3. In the Build History section, click the build number (for example, #1), and then click Console Output in the navigation menu to view the live build logs.

  4. Monitor the build output for the kubectl --namespace=new-feature apply... messages. When the build finishes, Jenkins deploys your new-feature branch to your cluster.

Note: In a development scenario, you wouldn't use a public-facing load balancer. To help secure your application, you can use kubectl proxy. The proxy authenticates with the Kubernetes API and forwards requests from your local machine to the service in the cluster without exposing your service to the internet.
  1. After the build finishes, start the proxy in Cloud Shell:
kubectl proxy &
  1. If the command stalls, press CTRL+C to exit. Verify that your application is accessible by sending a request to localhost and letting kubectl proxy forward it to your service:
curl \ http://localhost:8001/api/v1/namespaces/new-feature/services/gceme-frontend:80/proxy/version

The command responds with 2.0.0, which is the version that is now running.

If you receive an error similar to the following output:

{ "kind": "Status", "apiVersion": "v1", "metadata": { }, "status": "Failure", "message": "no endpoints available for service \"gceme-frontend:80\"", "reason": "ServiceUnavailable", "code": 503
  1. The frontend endpoint hasn't propagated yet; wait a moment and run the curl command again. Proceed when you receive the following output:
2.0.0

You have set up the development environment. Next, build on what you learned by deploying a canary release to test a new feature.

Click Check my progress to verify the objective.

Build for the new-feature branch

Task 6. Deploy a canary release

Now that you have verified that your app runs the latest code in the development environment, deploy that code to the canary environment.

  1. Create a canary branch and push it to the Git server:
git checkout -b canary git push origin canary
  1. In Jenkins, confirm that the canary pipeline has started. After the build completes, check the service URL to verify that your new version serves some of the traffic. About 1 in 5 requests (in no particular order) returns version 2.0.0:
export FRONTEND_SERVICE_IP=$(kubectl get -o \ jsonpath="{.status.loadBalancer.ingress[0].ip}" --namespace=production services gceme-frontend) while true; do curl http://$FRONTEND_SERVICE_IP/version; sleep 1; done
  1. If you continue to see only 1.0.0, run the preceding commands again. After you verify that 2.0.0 responses appear, press CTRL+C to stop the command.

You have deployed a canary release. Next, you deploy the new version to production.

Click Check my progress to verify the objective.

Deploying a canary release

Task 7. Deploy to production

Now that your canary release is successful and there are no customer complaints, deploy the release to the rest of your production fleet.

  1. Merge the canary branch into master and push it to the Git server:
git checkout master git merge canary git push origin master

In Jenkins, the master pipeline starts.

Click Check my progress to verify the objective.

Deploying to production
  1. After the build completes (which might take a few minutes), check the service URL to verify that your new version (2.0.0) serves all of the traffic:
export FRONTEND_SERVICE_IP=$(kubectl get -o \ jsonpath="{.status.loadBalancer.ingress[0].ip}" --namespace=production services gceme-frontend) while true; do curl http://$FRONTEND_SERVICE_IP/version; sleep 1; done
  1. If you still see instances of 1.0.0, run the preceding commands again. To stop this command, press CTRL+C.

Example output:

gcpstaging9854_student@qwiklabs-gcp-df93aba9e6ea114a:~/continuous-deployment-on-kubernetes/sample-app$ while true; do curl http://$FRONTEND_SERVICE_IP/version; sleep 1; done 2.0.0 2.0.0 2.0.0 2.0.0 2.0.0 2.0.0 ^C

You can also view the site where the gceme application displays the info cards. The card color changed from blue to orange.

  1. Run the following command to get the external IP address, and then copy the EXTERNAL-IP value into a new browser tab to view the info card:
kubectl get service gceme-frontend -n production

Example output:

Backend that serviced this request page

Test your understanding

Answer the following multiple-choice questions to reinforce your understanding of this lab's concepts.

You have deployed your application to production.

Congratulations!

This concludes this hands-on lab deploying and working with Jenkins in Kubernetes Engine to enable a Continuous Delivery / Continuous Deployment pipeline. You've had the opportunity to deploy a significant DevOps tool in Kubernetes Engine and configure it for production use. You've worked with the kubectl command-line tool and deployment configurations in YAML files, and have learned how to set up Jenkins pipelines for a development and deployment process. With this practical hands-on experience, you can apply these tools in your own DevOps environment.

Next steps / Learn more

Google Cloud training and certification

...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.

Manual Last Updated on November 10, 2026

Lab Last Tested August 27, 2026

Copyright 2026 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

Before you begin

  1. Labs create a Google Cloud project and resources for a fixed time
  2. Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
  3. On the top left of your screen, click Start lab to begin

Use private browsing

  1. Copy the provided Username and Password for the lab
  2. Click Open console in private mode

Sign in to the Console

  1. Sign in using your lab credentials. Using other credentials might cause errors or incur charges.
  2. Accept the terms, and skip the recovery resource page
  3. Don't click End lab unless you've finished the lab or want to restart it, as it will clear your work and remove the project

This content is not currently available

We can notify you via email when it becomes available

Great!

We can contact you via email if it becomes available

One lab at a time

Confirm to end all existing labs and start this one

Use private browsing to run the lab

Using an Incognito or private browser window is the best way to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.