How to install Google Cloud SDK on Ubuntu 22.04

Setting up the Google Cloud SDK on Ubuntu 22.04 allows you to interact with Google Cloud services and manage resources from your Ubuntu-based system. The Google Cloud SDK includes various command-line tools and libraries for this purpose. Here are the steps to set up the Google Cloud SDK on Ubuntu 22.04.

Here are the general steps to install the Google Cloud SDK on Ubuntu 22.04:

Open a Terminal: You can open a terminal window by pressing Ctrl + Alt + T on your keyboard.

Update Package Lists:

$ sudo apt update

Install Required Dependencies:

The Google Cloud SDK requires curl and python3 as dependencies. You can install them using the following command:

$ sudo apt install curl python3 -y

Add the Google Cloud SDK Repository:

To get the latest version of the Google Cloud SDK, you can add the official repository:

$ curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/google-cloud-archive-keyring.gpg

$ echo "deb [signed-by=/usr/share/keyrings/google-cloud-archive-keyring.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee /etc/apt/sources.list.d/google-cloud-sdk.list

Update Package Lists Again:

After adding the repository, update the package lists again:

$ sudo apt update

Install the Google Cloud SDK:

Now, you can install the Google Cloud SDK:

$ sudo apt install google-cloud-sdk -y

Initialize the SDK:

After installation, you need to initialize the Google Cloud SDK. Run the following command and follow the prompts:

$ gcloud init

This command will ask you to log in with your Google Cloud account and configure your default project and region.

Verify the Installation:

You can verify that the installation was successful by running:

$ gcloud version

It should display the installed Google Cloud SDK version

References:

https://kubernetes.io/docs/
https://www.redhat.com/en/topics/containers/what-is-kubernetes
https://cloud.google.com/kubernetes-engine/docs/concepts/pod
https://opencontainers.org/faq/
https://caylent.com/blog/kubernetes/kubectl-commands-cheat-sheet

Avatar photo

Asif Khan

Responsible and proactive professional with more than 13 years of experience in IT systems, open source software applications, DevOps, Linux systems, and cloud operations. My main goals are to automate things, keep them safe, and make sure they are strong. I am very good at planning and building the infrastructure for services that people really want. I was drawn to the fast-paced world of cloud computing because it has resources that can be scaled up or down as needed. One of my best skills is being able to use a lot of different DevOps tools to set up, release management, and microservices ecosystems, as well as for provisioning, orchestration, and configuration management.