1. Home
  2. Training Library
  3. Google Cloud Platform
  4. Courses
  5. Managing Container-Based Development Environments on GCP

Using Google Cloud Code in Visual Studio Code

The course is part of these learning paths

Developing for Google Kubernetes Engine
25
3
14
Google Professional Cloud DevOps Engineer Exam Preparation
14
1
5
1
Google Professional Cloud Developer Exam Preparation
16
2
14
1
Google Cloud Platform for Developers
15
2
15
more_horizSee 1 more
Start course
Overview
Difficulty
Intermediate
Duration
54m
Students
198
Ratings
3.4/5
starstarstarstar-halfstar-border
Description

In this course, we will explore some of the tools available to build and manage development environments intended for deployment on Google Cloud Platform products. We will also demonstrate how to easily push builds from our local machine to Google-hosted services.

We will start the course by covering the different types of development environments and their purposes. We will touch briefly on popular software methodologies and frameworks as they relate to choices in number and type of development environments.

This course will focus on container-based application development environments, tools, and services. We will first walk through installing and using Docker and Kubernetes on your local machine. Then we will explore how to push projects to Google Cloud Run and Google Kubernetes Engine.

Writing applications using Kubernetes or Cloud Run can be further streamlined with Google Cloud Code, which provides direct IDE support for development on these platforms. We will examine how to install and use Google Cloud Code with Visual Studio Code.

Learning Objectives

  • Understand the types of development environments and when to use them
  • Install a container-based local development environment
  • Add Google Cloud Code support to VS Code
  • Push code from a local development environment and run on Google Cloud Platform using:
    • Google Cloud Run
    • Google Kubernetes Engine
    • Google Deployment Manager

Intended Audience

  • Programmers interested in developing containerized applications on Google Cloud Platform
  • Solo developers new to working on a development team
  • Anyone preparing for the Google Professional Cloud DevOps Engineer certification

Prerequisites

To get the most out of this course, you should:

  • Have a Google Cloud Platform account
  • Have Google Cloud SDK installed and initialized
  • Be familiar with IAM role management for GCP resources
  • Have Visual Studio Code, Python 3, and Git installed

Knowledge of Python would also be beneficial for scripting with GCP, but it's not essential.

Resources

Transcript

Google Cloud Code takes basically everything we’ve learned so far in this course and combines it together for us in a neat package inside our IDE.  This is like the part of the math class where the teacher tells you that you can stop doing long division by hand and you can break out that calculator now.  Let’s see just how easy it is to work with Google Cloud Code in Visual Studio Code.

Just view Extensions in Visual Studio Code, install Cloud Code, and we’re already done.  We have just integrated kubectl, minikube, and Skaffold into our IDE.  Now we can just open a project, click on “Run on Kubernetes”, and test our application running on a local Kubernetes cluster all without even leaving Visual Studio Code.

Authenticating Visual Studio Code with our GCP account is also incredibly simple.  Let’s click on Kubernetes, then just click to log in with Google Cloud SDK.  Click proceed to sign in, and VS Code will open your browser to your Google account to confirm access.  Just click allow and then refresh the Kubernetes Explorer in VS Code.

If your project doesn’t have the container API enabled, you should see a new message here to just click to enable it.  Once it’s done, we should now see our project in the Google Kubernetes Engine Explorer, with no clusters available.  We’ll run through basically the same steps again to enable Google Cloud Run in VS Code.

Now that Google Cloud Code is installed and connected to our GCP account in Visual Studio Code, we are ready to take our project from development to staging.  In the next video, we’ll learn how we can create a GKE cluster from VS Code.

 

About the Author
Avatar
Arthur Feldkamp
IT Operations Manager and Cloud Administrator, Database and API Integrations Specialist
Students
267
Courses
2

Arthur spent seven years managing the IT infrastructure for a large entertainment complex in Arizona where he oversaw all network and server equipment and updated many on-premise systems to cloud-based solutions with Google Cloud Platform. Arthur is also a PHP and Python developer who specializes in database and API integrations. He has written several WordPress plugins, created an SDK for the Infusionsoft API, and built a custom digital signage management system powered by Raspberry Pis. Most recently, Arthur has been building Discord bots and attempting to teach a Python AI program how to compose music.