
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Enable Gemini
/ 35
Create a GKE cluster and deploy a web app
/ 35
Remediate a security misconfiguration
/ 30
Gemini for Google Cloud is an always-on AI collaborator that provides help to users of all skill levels where they need it. In this lab, you will learn how to identify and remediate security misconfigurations in your Google Cloud environment using Security Command Center's Gemini features.
In this lab, you will learn how to perform the following tasks:
As you monitor your infrastructure for ways to improve your security posture, Gemini can help identify infrastructure or configuration changes that will prevent issues in the future.
In this example, consider that you are a security engineer at an ecommerce company where managed Kubernetes clusters are regularly deployed. You need a way to see if there are any misconfigurations, and you want quick instructions to help fix those issues in your cloud environment.
For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.
Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel with the following:
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.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details panel.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details panel.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
You will first enable Gemini in your Google Cloud project and configure the necessary permissions for your Google Cloud Qwiklabs user account.
Click on the Cloud Shell icon () in the top-right corner of the Google Cloud console toolbar.
To set your project ID and region environment variables, run the following commands:
Click Authorize if prompted.
Enable the Cloud AI Companion API for Gemini:
Adding these roles lets the user use Gemini assistance.
Click Check my progress to verify your performed task.
You will now be creating a Google Kubernetes Engine (GKE) cluster running a handful of microservices.
test
:This should take a few minutes. Upon completion, you should see a result similar to the following:
You should see a web app similar to the following:
Click Check my progress to verify your performed task.
Now that you have an existing GKE cluster running an ecommerce app, you will identify areas where you can improve your security posture with Gemini.
Return to your tab with the Google Cloud console.
Refresh the Google Cloud console page.
Minimize the Cloud Shell pane.
Click on the Gemini icon () in the top-right corner of the Google Cloud console toolbar.
Click Start Chatting.
Enter the following prompt:
Gemini should respond with something similar to the following:
In this scenario, you decide that Security Command Center sounds like the right place to start.
With multiple visualizations discussing vulnerabilities, you want to ask Gemini to help you quickly understand what is classified as a vulnerability in Security Command Center.
Gemini's response should be similar to the following:
Click on the documentation link to better disambiguate between finding classes.
After reading about them, close the tab and return to the Google Cloud console.
Click Findings from the sidebar of the Google Cloud console.
To see the findings for your GKE cluster, find the "Quick Filters" section and select Google container cluster under Resource Type.
You should see a number of Medium severity findings.
At the top of this finding panel, you should see a section titled "Description" with a summary similar to the following:
Exit out of this information panel.
Next, click on the Over privileged account finding and view the summary in the description which is similar to the following:
Exit out of this information panel.
Finally, click on the Master authorized networks disabled finding. You should see a description similar to the following:
Now that you have an understanding of some of your environment's security misconfigurations, you will leverage Gemini's recommendations to remediate them.
Now that you have had the opportunity to review multiple areas to begin improving the security of your GKE cluster, you will remediate the "Master authorized networks disabled" finding using the instructions provided by Gemini's summary in Security Command Center.
Open the Navigation menu and select Kubernetes Engine > Clusters.
Click the name of the cluster you created earlier ("test").
Scroll down to the Control Plane Networking section.
Click on the pencil icon to edit Control plane networking.
Check the box next to Enable authorized networks.
Check the box underneath Add Google Cloud external IP addresses to authorized networks.
Click Save changes.
Click Clusters in the sidebar.
You will see cluster being updated, shown by a spinning wheel or half green circle icon in the Status section.
While the network policy updates for the control plane take place, open Gemini from the Google Cloud console toolbar.
Enter the following prompt:
Gemini's response should be similar to the following:
Applying the updated control plane policy may take a few minutes to take effect.
Click Check my progress to verify your performed task.
When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Copyright 2024 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.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one