Weaveworks GitOps Tools Extension provides an intuitive way to manage, troubleshoot and operate your Kubernetes environment following the GitOps operating model. GitOps accelerates your development lifecycle and simplifies your continuous delivery pipelines. The extension is built on Flux (a CNCF open source project). To learn more about the Flux GitOps toolkit, visit fluxcd.io
Use this extension to visualize, configure and debug Flux objects (sources and workloads) needed for GitOps workflows. For example, with this extension you can create a Flux GitRepository
source object that tracks a Git repository containing Kubernetes manifests for your application. Then add a Kustomization
workload object that periodically applies (reconciles) the manifests from the repository to your cluster. Now your Kubernetes changes are managed through git!
Your feedback is very important to us! Please help us by submitting issues for bugs, enhancements and share with us how you are using the extension.
This extension is under active development with rolling beta release cycle and stable releases. Breaking changes remain a possibility.
There are a few requirements before installing and using the extension:
- Install the
kubectl
command-line tool - You must have a working cluster selected in the
kubectl
config. Akind
or Docker Desktop cluster is an easy way to get started. More information about kubeconfigs is available here - The
flux
tool is required and can be installed from this extension - Additional dependencies for Weave GitOps Enterprise and Azure users
Once you have satisfied these requirements you can find and install GitOps Tools in the Extension Marketplace by searching for "fluxcd" or "gitops".
This extension uses two different methods to get information from the Kubernetes cluster. It preferentially will run kubectl proxy -p 0
for your selected cluster and will use the proxy with a javascript client for faster performance and real-time updates. This also requires watch
RBAC for Flux resources. If the proxy client connection can't be established the extension will fall back to kubectl get
for querying the cluster.
- Configure, visualize and manage Flux resources
- Tree views for Clusters, Sources, and Workloads
- Observe Flux resource updates in the cluster in real-time
- Select clusters and examine installed GitOps Toolkit components
- Enable and Disable GitOps (install/uninstall Flux) on clusters
- Create, view and edit sources (git, OCI, Helm and Bucket), and workloads (Kustomization and HelmRelease)
- Reconcile sources and workloads on demand
- Pause and resume scheduled reconciliation
- Create GitRepository and Kustomization objects from folders opened in vscode
- Clone GitRepository source to user machine and open them in the editor
- Preview sources, workloads and other objects information with tooltips
- Open remote resources as
.yaml
files in the editor - Open and edit the kubeconfig file
- Trace Kubernetes objects created by workloads
- Watch Flux controller logs and
flux
CLI commands for diagnostics - Documentation links for Flux and Weave GitOps embedded in the extension
We presented Flux and the GitOps Tools extension to our widest audience yet, the VSCode Live Stream! Follow this video link to learn about a new feature integration we built into the extension: Weave GitOps Enterprise Templates.
(Clusters, Sources and Workflows tree views; Kustomization
tooltip and HelmRepository
YAML view)
(Configure GitOps view is used to create sources and workloads)
(Right clicking in the Explorer view to create Flux objects from folders)
You can access GitOps tools check, CLI dependendency versions, Clusters, Sources and Workloads views Focus, Refresh and other commands by typing GitOps
in View -> Command Palette...
menu prompt:
The extension uses several CLI commands that must be installed and available in your system PATH
.
You will need the kubectl
CLI tool to use this extension.
flux
is also required but can be installed by the extension:
For users running clusters in Azure including AKS and Arc clusters, the az
command line tool is also required.
Tool | Description | Installation |
---|---|---|
kubectl |
The kubectl command line tool lets you control Kubernetes clusters. | Install Kubectl |
flux |
Flux is a set of continuous and progressive delivery solutions for Kubernetes. | Install Flux CLI |
git |
Git is a free and open source distributed version control system. | Install git |
Optional tools:
Tool | Description | Installation |
---|---|---|
gitops |
Weave GitOps Enterprise (WGE) CLI (required for Templates feature) | Install WGE CLI |
az |
Azure CLI. (only if using the extension to create or register Azure clusters) | Install az |
docker |
Docker is an open platform for developing, shipping, and running applications. | Install Docker |
If the extension needs one of the core Kubernetes tools and they are missing, it will prompt you to install them.
The GitOps Tools Extension depends on the Kubernetes Tools extension, which will be installed automatically if you don't already have it.
- Make sure you have successfully authenticated on your
az
CLI and have access to the correct subscription for your AKS or ARC cluster. - The easiest way to get your AKS or Arc cluster visible by the GitOps and Kubernetes Extensions, is to use the
az
CLI to merge the kubeconfig for accessing your cluster onto the defaultkubectl
config. Useget-credentials
as shown in the official CLI documentation. In order to enable GitOps in a cluster you will likely need the--admin
credentials.
WGE users can access GitOpsTemplates directly from this extensions. WGE integration adds another treeview that shows GitOpsTemplate
, Canary
, Pipeline
, and GitOpsSet
resources and adds new interactions to each type of resource. All WGE resources have a right-click action to open them in WGE portal.
GitOpsTemplates are provided by cluster administrators (Platform Teams) and can be used to quickly create cluster and configure applications with GitOps. Flagger Canaries status can be visualized and their progress tracked. Pipelines are listed with their targets and each GitopsCluster
attached to a Pipeline can be set as the current selected cluster for quick navigation between clusters.
WGE integration is an opt-in feature that must be enabled in settings:
For the integration to work, this extension needs a ConfigMap that provides WGE information and settings:
`kubectl create configmap weave-gitops-interop --from-literal=portalUrl='https://WGE-CLUSTER-HOST' --from-literal=wgeClusterName='WGE-CLUSTER-NAME' -n flux-system``
apiVersion: v1
kind: ConfigMap
metadata:
namespace: flux-system
name: weave-gitops-interop
data:
portalUrl: https://mccp.howard.moomboo.space
wgeClusterName: howard-moomboo-space
We rely on the Kubernetes extension to discover and connect to clusters. If you are having issues accessing or viewing your cluster, follow the documentation provided by the Kubernetes extension.
Confirm that your configuration context shows in a terminal running kubectl config get-contexts
Unreachable or laggy clusters can create long running that cluster resource queries that finish after switching to a working cluster context. This can lead to the slow cluster data overwriting the current cluster treeview. Clusters -> Refresh button will reinitialize the views with current data. Timeout settings can be adjusted under GitOps section in VSCode Settings.
The extension has timeout options that can make be adjusted in VSCode settings to match your cluster network constraints. The default timeout for any data query operation is 60 seconds.
flux check
command can also be disabled in the settings. This will stop flux check
warnings about old versions but will disable Flux controller status icons in the the Clusters treeview.
The GitOps Tools Extension for Visual Studio Code collects usage data and sends it to Weaveworks to help improve our products and services. Read our privacy statement to learn more. This extension respects the telemetry.enableTelemetry
setting.
VSCodium user can search and install from the VSCodium Open-VSX extension registry.
- Download the latest
vsix
artifact version from our Releases page. - Run
code --install-extension gitops-tools-$VERSION.vsix