0
0
GCPcloud~30 mins

Why managed Kubernetes matters in GCP - See It in Action

Choose your learning style9 modes available
Why Managed Kubernetes Matters
📖 Scenario: You are working in a small company that wants to deploy applications on the cloud. You have heard about Kubernetes but find it complex to manage. Your team is considering using a managed Kubernetes service on Google Cloud Platform (GCP) to simplify deployment and maintenance.
🎯 Goal: Learn why using a managed Kubernetes service like Google Kubernetes Engine (GKE) is helpful. You will create a simple data structure to represent Kubernetes clusters, add configuration for managed services, filter clusters that are managed, and display the benefits.
📋 What You'll Learn
Create a dictionary with Kubernetes clusters and their types
Add a variable to identify managed clusters
Use a loop to find all managed clusters
Print the list of managed clusters
💡 Why This Matters
🌍 Real World
Companies use managed Kubernetes services like GKE to avoid the complexity of setting up and maintaining Kubernetes themselves. This saves time and reduces errors.
💼 Career
Understanding why managed Kubernetes matters helps you communicate with cloud teams and supports decisions about infrastructure management in DevOps roles.
Progress0 / 4 steps
1
Create Kubernetes clusters dictionary
Create a dictionary called clusters with these exact entries: 'cluster1': 'self-managed', 'cluster2': 'managed', 'cluster3': 'self-managed', 'cluster4': 'managed'.
GCP
Need a hint?

Use curly braces to create a dictionary with keys as cluster names and values as their types.

2
Add managed cluster type variable
Create a variable called managed_type and set it to the string 'managed'.
GCP
Need a hint?

Assign the string 'managed' to the variable managed_type.

3
Find all managed clusters
Create a list called managed_clusters that contains the names of clusters from clusters where the cluster type equals managed_type. Use a for loop with variables cluster and ctype to iterate over clusters.items().
GCP
Need a hint?

Use a loop to check each cluster's type and add the cluster name to the list if it is managed.

4
Display managed clusters
Write a print statement to display the text 'Managed Kubernetes clusters:' followed by the managed_clusters list.
GCP
Need a hint?

Use print('Managed Kubernetes clusters:', managed_clusters) to show the result.