Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>DigitalOcean Kubernetes (Unofficial)New to Visual Studio Code? Get it now.
DigitalOcean Kubernetes (Unofficial)

DigitalOcean Kubernetes (Unofficial)

Flux Labs

| (0) | Free
Unofficial extension to manage DigitalOcean Kubernetes (DOKS) clusters directly from VS Code. Not affiliated with or endorsed by DigitalOcean.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

DigitalOcean Kubernetes for VS Code (Unofficial)

⚠️ DISCLAIMER: This is an unofficial, community-developed extension and is NOT affiliated with, endorsed by, or supported by DigitalOcean, LLC. DigitalOcean and the DigitalOcean logo are trademarks of DigitalOcean, LLC.

Manage your DigitalOcean Kubernetes (DOKS) clusters directly from Visual Studio Code. This extension provides a seamless integration with DigitalOcean's Kubernetes service, allowing you to create, manage, and interact with your clusters without leaving your editor.

Features

Cluster Management

  • View all clusters - See all your DOKS clusters in a tree view
  • Create clusters - Create new Kubernetes clusters with guided configuration
  • Delete clusters - Safely delete clusters with confirmation
  • View cluster details - Rich information panel showing cluster configuration
  • Open in browser - Quick access to DigitalOcean console

Node Pool Management

  • View node pools - See all node pools and their nodes
  • Scale node pools - Easily adjust the number of nodes
  • View node status - Real-time node status information

Kubeconfig Management

  • Download kubeconfig - Get cluster credentials with configurable expiry
  • Merge or separate - Choose to merge with existing kubeconfig or save separately
  • Set current context - Quickly switch between clusters

Kubernetes Resources

  • Namespaces - View all namespaces
  • Pods - List pods, view logs, exec into containers
  • Deployments - View deployment status and replicas
  • Services - See service types and endpoints
  • ConfigMaps - View configuration data
  • Secrets - List secrets (values hidden)

Developer Tools

  • Pod logs - Stream or fetch pod logs
  • Exec into pods - Open a terminal session in a container
  • Port forwarding - Forward ports from pods/services to localhost
  • Apply manifests - Deploy YAML files directly to your cluster

Requirements

  • VS Code 1.85.0 or higher
  • kubectl installed and in PATH (for resource management features)
  • DigitalOcean account with API access
  • DigitalOcean API token with read/write access

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "DigitalOcean Kubernetes"
  4. Click Install

Or install from the command line:

code --install-extension digitalocean-kubernetes

Getting Started

1. Get a DigitalOcean API Token

  1. Log in to DigitalOcean
  2. Navigate to API → Tokens
  3. Click Generate New Token
  4. Give it a name and select Read/Write scope
  5. Copy the token (you won't see it again!)

2. Authenticate in VS Code

  1. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Run DigitalOcean K8s: Authenticate with DigitalOcean
  3. Paste your API token when prompted
  4. Your token is stored securely in VS Code's secret storage

3. Start Using the Extension

  • Click the DigitalOcean icon in the Activity Bar
  • View your clusters in the Clusters panel
  • Select a cluster to view its resources in the Resources panel

Configuration

Open VS Code settings and search for "DigitalOcean" to configure:

Setting Description Default
digitalocean-k8s.kubeconfigPath Custom path for kubeconfig files ~/.kube/
digitalocean-k8s.autoRefreshInterval Auto-refresh interval in seconds (0 to disable) 30
digitalocean-k8s.defaultRegion Default region for new clusters nyc1
digitalocean-k8s.showNodePools Show node pools in cluster tree true

Commands

All commands are available in the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

Authentication

  • DigitalOcean K8s: Authenticate with DigitalOcean
  • DigitalOcean K8s: Logout

Cluster Management

  • DigitalOcean K8s: Refresh Clusters
  • DigitalOcean K8s: Create Cluster
  • DigitalOcean K8s: Delete Cluster
  • DigitalOcean K8s: Download Kubeconfig
  • DigitalOcean K8s: Set as Current Context
  • DigitalOcean K8s: View Cluster Info
  • DigitalOcean K8s: Open in DigitalOcean Console
  • DigitalOcean K8s: Scale Node Pool

Resource Management

  • DigitalOcean K8s: Refresh Resources
  • DigitalOcean K8s: View Pod Logs
  • DigitalOcean K8s: Delete Pod
  • DigitalOcean K8s: Exec into Pod
  • DigitalOcean K8s: Port Forward
  • DigitalOcean K8s: Apply Manifest to Cluster

Usage Examples

Creating a New Cluster

  1. Click the + icon in the Clusters panel header
  2. Enter a cluster name (lowercase letters, numbers, hyphens)
  3. Select a region
  4. Choose the Kubernetes version
  5. Select node size
  6. Enter the number of nodes
  7. Choose whether to enable High Availability
  8. Wait for the cluster to be provisioned

Viewing Pod Logs

  1. Select a cluster and set it as current context
  2. Expand Pods in the Resources panel
  3. Right-click a pod and select View Pod Logs
  4. Choose the number of lines to fetch
  5. Optionally stream live logs

Port Forwarding

  1. Right-click a pod or service in the Resources panel
  2. Select Port Forward
  3. Enter the remote port to forward
  4. Enter the local port (or use the same as remote)
  5. The port forward will be active until you stop it

Applying Manifests

  1. Open a YAML file containing Kubernetes resources
  2. Right-click in the editor
  3. Select Apply Manifest to Cluster
  4. Choose the target namespace
  5. The manifest will be applied to your current cluster

Troubleshooting

kubectl not found

If you see a warning about kubectl not being installed:

  1. Install kubectl following the official guide
  2. Ensure kubectl is in your system PATH
  3. Restart VS Code

Authentication Issues

If authentication fails:

  1. Verify your API token has read/write access
  2. Check that the token hasn't expired
  3. Try logging out and re-authenticating
  4. Ensure you have network access to api.digitalocean.com

Cluster Connection Issues

If you can't connect to a cluster:

  1. Download a fresh kubeconfig
  2. Verify the cluster is in "running" state
  3. Check your network/firewall settings
  4. Ensure kubectl is properly configured

Security

  • API tokens are stored securely using VS Code's built-in secret storage
  • Kubeconfig files are created with restricted permissions (600)
  • Tokens can have configurable expiration times
  • No sensitive data is logged or transmitted except to DigitalOcean APIs

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

MIT License - see LICENSE for details.

Support

  • GitHub Issues
  • DigitalOcean Community
  • DigitalOcean Support
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft