Skip to content

open-cluster-management-io/ocm-vscode-extension

OCM VScode Extension

Open Cluster Management (OCM) is a community-driven project focused on multicluster and multicloud scenarios for Kubernetes apps.

OCM VScode Extension is a UI tool for OCM related Kubernetes resources that has been built upon Visual Studio Code and offers additional OCM administrative and monitoring features in order to improve operational efficiency and accelerate development within engineering teams.

Get a full introduction to OCM VScode Extension on YOUTUBE


Create Local Environment



Prerequisites

You must meet the following prerequisites to install OCM VScode Extension:

You must meet some additional prerequisites to utilize OCM VScode Extension features:

Feature Prerequisites
Resources Snippets None
Bootstrap Project None
Manage Existing Resources kubectl
Create Local Environment kubectl, clusteradm, kind

Installation

Install Latest version

In your VScode instance, go to the Extensions Marketplace (by clicking on the Extensions icon in the composite bar on the left hand side or simply pressing Ctrl+Shift+X on your keyboard).

Search for OCM Extension and click install.

Install specific version

To download a specific version of VScode Extension visit the releases page, expand the Assets section of the target version, and download the version for your operating system.

In your VScode instance, go to the Extensions Marketplace (by clicking on the Extensions icon in the composite bar on the left hand side or simply pressing Ctrl+Shift+X on your keyboard).

Click the ... at the top right corner of the palette, select the Install from VSIX... action, and browse for the specific VSIX file you downloaded.

Select a VSIX file and hit install.


Features

Resources Snippets

OCM VScode Extension allows users to load Custom Resource (CR) snippets from the command palette.

The resources available as snippets are:

  • Subscription
  • Placement
  • Channel
  • ManagedClusterSet
  • ManagedClusterSetBinding

Subscription snippets are available specifically tailored to either Git, Helm or ObjectBucket.

To exercise this feature you must take the following steps:

  1. Create a new yaml file in a desired path
  2. Open the file and press Ctrl+Shift+P on your keyboard
  3. In the search container at the top of your screen choose Snippets: Insert Snippet
  4. Choose a desired snippet from list


Resources Snippets


Bootstrap Project

Another valuable feature of OCM VScode Extension is to create a Bootstrap project for the various channel types.

The Bootstrap project is basically a collection of snippets, customized to fit one of three channel types - Git, Helm or ObjectBucket, that form a project template for you to build upon.

To exercise this feature you must take the following steps:

  1. Press Ctrl+Shift+P on your keyboard
  2. In the search container at the top of your screen choose OCM: Create an application-manager project
  3. Choose a desired channel type
  4. Type in a project name and hit enter


Bootstrap Project


Create Local Environment

The Create Local Environment feature allows you to create a quick OCM multi-cluster control plane on a local kind environment with only a click of a button.

The feature does it all for you:

  • Verifies the existence of the required tools.
  • Creates as many kind clusters as you need (customizable).
  • Initializes the hub cluster by installing a Cluster Manager using clusteradm, and kubectl.
  • Installs a Klusterlet agent on the managed clusters and sends join requests to the hub cluster using clusteradm, and kubectl.
  • Accepts the join requests from the hub cluster using clusteradm, and kubectl.

To exercise this feature you must take the following steps:

  1. Click on the OCM icon in the composite bar on the left hand side to open OCM VScode Extension control pane
  2. Locate the Create Local Environment button in the Developers Tools section and give it a click
  3. Notice that at the top of your screen an action container will prompt you to choose between default or custom configuration
  4. After configuration was specified, a progress bar at the botom right of your screen will provide feadback on the build process


Create Local Environment


Manage Existing Resources

The Manage Existing Resources feature provides a wide and detailed overview of all the resources residing in any one cluster.

To exercise this feature you must take the following steps:

  1. Access the Cluster Details tab either by:
    • Pressing Ctrl+Shift+P on your keyboard and choosing OCM-View: Cluster Details in the search container at the top of your screen
    • Clicking on the OCM icon in the composite bar on the left hand side to open OCM VScode Extension control pane, locating the Connected Clusters section and selecting any cluster in the list
  2. Inside the Cluster Details tab, use the dropdown to select any cluster from the list of availabe clusters in order to view the resources within it


Create Local Environment


Recommendations

Take a look at some other great VScode extensions to improve your OCM experience!

To install the recommended VScode extensions, please visit the Extensions Marketplace (by clicking on the Extensions icon in the composite bar on the left hand side or simply pressing Ctrl+Shift+X on your keyboard).


Contributing

See our Contributing Guidelines for more information.