Wayback Machine
160 captures
04 Jan 2019 - 09 Jul 2025
Apr MAY Jul
Previous capture 30 Next capture
2021 2022 2023
success
fail
About this capture
COLLECTED BY
Collection: Ukrainian Web
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20220530205527/https://code.visualstudio.com/docs/azure/kubernetes
Skip to content  Visual Studio Code
  • Docs
  • Updates
  • Blog
  • API
  • Extensions
  • FAQ
  • Learn
  • Search
  • Search Search
  • Download VS Code Download VS Code Download

Version 1.67 is now available! Read about the new features and fixes from April.

Dismiss this update
'; document.body.appendChild(div.children[0]); } function pushCodingPackEvent(language, os) { let id = `${language}-${os}-coding-pack`; var analytics = window.vscodeAnalytics; analytics && analytics.event( 'click', 'download', id, ); }
  • Overview
  • Setup
    • Overview
    • Linux
    • macOS
    • Windows
    • Raspberry Pi
    • Network
    • Additional Components
    • Uninstall
  • Get Started
    • Intro Videos
    • Tips and Tricks
    • User Interface
    • Themes
    • Settings
    • Key Bindings
    • Display Language
    • Telemetry
  • User Guide
    • Basic Editing
    • Extension Marketplace
    • IntelliSense
    • Code Navigation
    • Refactoring
    • Debugging
    • Version Control
    • Working with GitHub
    • VS Code for the Web
    • Integrated Terminal
    • Tasks
    • Settings Sync
    • Snippets
    • Emmet
    • Command Line
    • Workspace Trust
    • Multi-root Workspaces
    • Accessibility
  • Languages
    • Overview
    • JavaScript
    • JSON
    • HTML
    • CSS, SCSS and Less
    • TypeScript
    • Markdown
    • PowerShell
    • C++
    • Java
    • PHP
    • Python
    • Julia
    • R
    • Rust
    • Go
    • T-SQL
    • C#
    • .NET
  • Node.js / JavaScript
    • Working with JavaScript
    • Node.js Tutorial
    • Node.js Debugging
    • Node.js Deployment
    • Browser Debugging
    • Angular Tutorial
    • React Tutorial
    • Vue Tutorial
    • Ember Tutorial
    • Debugging Recipes
    • Extensions
  • TypeScript
    • Tutorial
    • Compiling
    • Debugging
  • Python
    • Tutorial
    • Editing Code
    • Linting
    • Debugging
    • Environments
    • Testing
    • Data Science
    • Python Interactive
    • Django Tutorial
    • Flask Tutorial
    • Create containers
    • Python on Azure
    • Settings Reference
  • Java
    • Getting Started
    • Navigate and Edit
    • Refactoring
    • Formatting and Linting
    • Project Management
    • Build Tools
    • Run and Debug
    • Testing
    • Spring Boot
    • Application Servers
    • Java on Azure
    • GUI Applications
    • Extensions
    • FAQ
  • C++
    • Intro Videos
    • GCC on Linux
    • GCC on Windows
    • GCC on Windows Subsystem for Linux
    • Clang on macOS
    • Microsoft C++ on Windows
    • Build with CMake
    • CMake Tools on Linux
    • Debugging
    • Editing
    • Settings
    • Configure IntelliSense for cross-compiling
    • FAQ
  • Containers
    • Overview
    • Node.js
    • Python
    • ASP.NET Core
    • Debug
    • Docker Compose
    • Registries
    • Deploy to Azure
    • Choose a dev environment
    • Customize
    • Develop with Kubernetes
    • Tips and Tricks
  • Data Science
    • Overview
    • Jupyter Notebooks
    • Data Science Tutorial
    • Python Interactive
    • PyTorch Support
    • Azure Machine Learning
  • Azure
    • Extensions
    • Deployment
    • Remote Debugging for Node.js
    • Docker
    • MongoDB
    • Kubernetes
    • Azure Kubernetes Service
  • Remote
    • Overview
    • SSH
    • Containers
    • Windows Subsystem for Linux
    • GitHub Codespaces
    • SSH Tutorial
    • Containers Tutorial
    • WSL Tutorial
    • Attach to Container
    • Create a Dev Container
    • Advanced Containers
    • devcontainer CLI
    • devcontainer.json
    • Tips and Tricks
    • FAQ

Topics

Working with Kubernetes in VS Code

This document will walk you through the process of deploying an application to Kubernetes with Visual Studio Code. Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. We will show you how to create a Kubernetes cluster, write a Kubernetes manifest file (usually written in YAML), which tells Kubernetes everything it needs to know about the application, and then finally deploy the application to the Kubernetes cluster.

Before you begin

You will need to have tools for Docker and kubectl. See the Install Docker documentation for details on setting up Docker on your machine and Install kubectl. Before proceeding further, verify you can run Docker and kubectl commands from the shell.

You can create a local Kubernetes cluster with minikube or an Azure Kubernetes cluster in Azure Kubernetes Service (AKS). In this tutorial, we will use Azure Kubernetes Service (AKS) and you will need to have your Azure account ready for the deployment steps.

In addition, if you want to iteratively run and debug containers directly in MiniKube, Azure Kubernetes Service (AKS), or another Kubernetes provider, you can install the Bridge to Kubernetes extension. To get started, see Use Bridge to Kubernetes.

Install the Kubernetes extension

For a fully integrated Kubernetes experience, you can install the Kubernetes Tools extension, which lets you quickly develop Kubernetes manifests and HELM charts. With the extension, you can also deploy containerized micro-service based applications to local or Azure Kubernetes clusters and debug your live applications running in containers on Kubernetes clusters. It also makes it easy to browse and manage your Kubernetes clusters in VS Code and provides seamless integration with Draft to streamline Kubernetes development.

To install the Kubernetes extension, open the Extensions view (⇧⌘X (Windows, Linux Ctrl+Shift+X)) and search for "kubernetes". Select the Microsoft Kubernetes extension.

Install Kubernetes

Containerize and publish the application

You can follow the Working with Docker tutorial to build your project, generate a Docker image, and push it to a public or private container registry through the Microsoft Docker Extension.

Create and config a Kubernetes cluster

You can create a Kubernetes cluster running on Azure using the Kubernetes extension in VS Code. Once you have installed the Kubernetes extension, you will see KUBERNETES in the Explorer. Click on More and choose Create Cluster. Follow the instructions to choose the cluster type (here we choose Azure Kubernetes Service), select your subscription, and set up the Azure cluster and Azure agent settings. It will take a few minutes to complete the whole workflow.

Create Kubernetes

Important: To create a Kubernetes cluster on Azure, you need to install the Azure CLI and sign in.

Tip: You will encounter an error if you don't have an available RSA key file. Follow create SSH public-private key to create your key before creating an Azure Kubernetes cluster.

Error with RSA

Tip: You might encounter an error indicating conflicting location and VM size when creating an Azure Kubernetes cluster. Pay attention to choose proper location and VM size.

Error creating cluster

Deploy the application to Azure Kubernetes Service

The Kubernetes extension provides autocompletion, code snippets, and verification for the Kubernetes manifest file. For example, once you type 'Deployment' in an empty YAML file, a manifest file with fundamental structure is autogenerated for you. You only need to enter your app name, image, and port manually.

Create manifest

Below is an example manifest file:

Manifest example

Once your manifest file is ready, you only need one command to start a deployment. Open the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) and run Kubernetes: Create. It will deploy the application to your Kubernetes cluster and create objects according to the configuration in the open Kubernetes manifest file.

Start deployment

Checking on your deployment

After deployment, the Kubernetes extension can help you check the status of your application. From the Explorer, click on Workloads, right click on Pods and then choose Get to see whether the application has started. To view the status of your app, select Services, right click on your app, and then click Get. The status will be printed to the Integrated Terminal. Once your application has an EXTERNAL_IP, you can open a browser and see your web app running.

Check status

Congratulations! Now your app is successfully running in Azure Kubernetes Service!

Next steps

  • Overview of Bridge to Kubernetes - Learn more about Bridge to Kubernetes, a rapid, iterative Kubernetes development experience for teams.
  • Azure Extensions - The VS Code Marketplace has hundreds of extensions for Azure and the cloud.
  • Deploying to Azure - Learn step-by-step how to deploy your application to Azure.
5/4/2022

In this article there are 6 sectionsIn this article

  • Before you begin
  • Install the Kubernetes extension
  • Containerize and publish the application
  • Create and config a Kubernetes cluster
  • Deploy the application to Azure Kubernetes Service
  • Next steps
  • Hello from Seattle.
  • Follow @code
  • Support
  • Privacy
  • Manage Cookies
  • Terms of Use
  • License
Microsoft homepage Microsoft homepage © 2022 Microsoft