Set up a complete Kubernetes development environment for node and provider development.
This guide covers the complex setup required for contributing to Akash node and provider repositories, including local Kind clusters and remote SSH clusters.
For Console and website development, see Console & Website Setup - much simpler!
Prerequisites
Required for Node & Provider Development
- Git - Version control
- GitHub Account - For forking and PRs
- Code Editor - VS Code, GoLand, or your preference
- Go - 1.25.0 or later (latest version)
- Docker Engine/Desktop - For Kind clusters
- GNU Make - 4.0 or later
- Bash - 4.0 or later
- Direnv - 2.32.x or later
System-Specific Setup
macOS
Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install Development Tools
# Core toolsbrew install go node git make
# Additional utilitiesbrew install wget jq curl gnu-getopt direnv
# GNU Make (macOS default is outdated)brew install makeexport PATH="/usr/local/opt/make/libexec/gnubin:$PATH"Add to your ~/.zshrc or ~/.bashrc:
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"Setup Direnv
Direnv manages environment variables per project:
# Installbrew install direnv
# Add to ~/.zshrcecho 'eval "$(direnv hook zsh)"' >> ~/.zshrc
# Or add to ~/.bashrcecho 'eval "$(direnv hook bash)"' >> ~/.bashrc
# Reload shellsource ~/.zshrc # or source ~/.bashrcLinux (Ubuntu/Debian)
Install Development Tools
# Update package listsudo apt-get update
# Install Gocd /tmpwget https://go.dev/dl/go1.25.0.linux-amd64.tar.gzsudo rm -rf /usr/local/gosudo tar -C /usr/local -xzf go1.25.0.linux-amd64.tar.gz
# Add Go to PATHecho 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrcsource ~/.bashrc
# Verifygo version
# Install Node.js (via nvm recommended)curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bashsource ~/.bashrcnvm install 22nvm use 22
# Install other toolssudo apt-get install -y make git wget curl jq build-essential direnv
# Setup direnvecho 'eval "$(direnv hook bash)"' >> ~/.bashrcsource ~/.bashrcWindows (WSL2 Recommended)
Use Windows Subsystem for Linux 2:
# In PowerShell (Admin)wsl --install -d Ubuntu
# Restart, then follow Linux instructions aboveNode & Provider Development Environment
The node and provider repositories require a complete Kubernetes development environment. This guide covers both local and remote cluster setups.
Overview
This page covers setting up a development environment for both node and provider repositories. The provider repository contains all setup scripts as it depends on the node repository.
Development approaches:
- Local Kind Cluster (
kube) - Most common, runs locally with Docker - Single Node Cluster (
single) - All services run as Kubernetes deployments - Remote SSH Cluster (
ssh) - For testing GPU workloads and IP leases - Minikube - Alternative local cluster (not commonly used)
Requirements
Software Requirements
Core:
- Go - 1.25.0 or later (latest version required)
- Docker Engine/Desktop - For containerization
- GNU Make - 4.0 or later
- Bash - 4.0 or later
- Direnv - 2.32.x or later
- wget - For downloads
- realpath - Path utilities
Additional:
- unzip
- curl
- npm
- jq
- readlink
- git
macOS Specific:
- Homebrew
- gnu-getopt (
brew install gnu-getopt)
Verify versions:
go versionmake --versionbash --versiondirenv versionInstall All Dependencies (Automated)
# Clone repositories firstmkdir -p ~/go/src/github.com/akash-networkcd ~/go/src/github.com/akash-networkgit clone https://github.com/akash-network/node.gitgit clone https://github.com/akash-network/provider.git
# Run automated installer (macOS and Debian-based Linux)./provider/script/install_dev_dependencies.shSupported platforms:
- **macOS
- **Debian-based Linux
- **Windows (not supported - use WSL2)
Runbook Structure
All development configurations are in the provider/_run directory:
provider/_run/├── kube/ # Local Kind cluster (most common)├── single/ # All services in Kubernetes├── ssh/ # Remote cluster via SSH└── minikube/ # Minikube setupCommands are implemented as make targets. All runbooks share the same commands once set up.
Environment Parameters
Common parameters available across all runbooks:
| Parameter | Default | Applies To | Description |
|---|---|---|---|
SKIP_BUILD | false | All | Skip binary rebuilds |
DSEQ | 1 | deployment-, lease-, bid-*, send-manifest | Deployment sequence |
OSEQ | 1 | deployment-, lease-, bid-*, send-manifest | Order sequence |
GSEQ | 1 | deployment-, lease-, bid-*, send-manifest | Group sequence |
KUSTOMIZE_INSTALLS | Varies | kustomize-* | Components to install |
KUBE_ROLLOUT_TIMEOUT | 120 | All | Kubernetes rollout timeout (seconds) |
Usage:
KUBE_ROLLOUT_TIMEOUT=300 make kube-cluster-setupDSEQ=5 GSEQ=2 make query-deploymentsLocal Kind Cluster Setup (Recommended)
Purpose: Complete local development environment using Kubernetes in Docker.
Overview
The Kind (Kubernetes in Docker) runbook creates a local cluster where:
- Node and provider run as host services
- Operators run as Kubernetes deployments
- Complete end-to-end testing capability
This is the most widely used development setup.
Prerequisites
- Docker Desktop/Engine running
- Direnv configured
- All dependencies installed
Setup Steps
Note: This requires three simultaneous terminals. We’ll call them terminal1, terminal2, and terminal3.
STEP 1 - Navigate to Kube Directory
Run on all three terminals:
cd ~/go/src/github.com/akash-network/provider/_run/kubeSTEP 2 - Create and Provision Local Cluster
Run on terminal1 only:
# This may take several minutesmake kube-cluster-setupWhat this does:
- Creates a local Kind cluster
- Sets up ingress controller
- Configures networking
- Installs required components
If timeout occurs:
The ingress controller may take longer to initialize. If you see:
error: timed out waiting for the conditionmake: *** [kube-setup-ingress-default] Error 1Run with extended timeout:
cd ~/go/src/github.com/akash-network/provider/_run/kubemake kube-cluster-deletemake cleanmake initKUBE_ROLLOUT_TIMEOUT=300 make kube-cluster-setupGoreleaser version issue:
If you see Unable to find image 'ghcr.io/goreleaser/goreleaser-cross:v':
export GOVERSION_SEMVER=v1.24.2KUBE_ROLLOUT_TIMEOUT=300 make kube-cluster-setupSTEP 3 - Start Akash Node
Run on terminal2:
make node-runExpected output:
- Node starts and begins syncing
- Blockchain state initializes
- RPC and API servers start
Keep this terminal running - you’ll see node logs here.
STEP 4 - Create Provider
Run on terminal1:
make provider-createWhat this does:
- Registers provider on the blockchain
- Creates provider account
- Sets provider attributes
STEP 5 - Start Provider
Run on terminal3:
make provider-runExpected output:
- Provider connects to node
- Bidding engine starts
- Cluster monitoring begins
Keep this terminal running - you’ll see provider logs here.
STEP 6 - Test Deployment Workflow
Run on terminal1:
# Create a test deploymentmake deployment-create
# Query the deploymentmake query-deployments
# Check for ordersmake query-orders
# View provider bidsmake query-bids
# Create a leasemake lease-create
# Verify leasemake query-leases
# Send deployment manifestmake send-manifest
# Check lease statusmake provider-lease-status
# Test connectivitymake provider-lease-ping
# View deployment logsmake provider-lease-logsCleanup and Reset
Full cleanup:
cd ~/go/src/github.com/akash-network/provider/_run/kubemake kube-cluster-deletemake cleanmake initRestart services only:
# Stop servicesmake provider-stopmake node-stop
# Restartmake node-run # in terminal2make provider-run # in terminal3Remote SSH Cluster Setup (Advanced)
Purpose: Test GPU workloads, IP leases, or production-like deployments.
Overview
The SSH runbook connects to a remote Kubernetes cluster for:
- GPU provider testing
- IP lease functionality
- Production environment simulation
- Complex networking scenarios
Prerequisites
Remote Cluster:
- Kubernetes cluster with external API access
- SSH access to cluster nodes
- kubectl configured
- GPU drivers (for GPU testing)
Local Machine:
- SSH key configured
- kubectl installed
- Direnv configured
Remote Cluster Preparation
On Remote Cluster
# Install containerd (if not already installed)apt-get update && apt-get install -y containerd
# Install nerdctl for image managementwget https://github.com/containerd/nerdctl/releases/download/v1.7.0/nerdctl-1.7.0-linux-amd64.tar.gztar Cxzvvf /usr/local/bin nerdctl-1.7.0-linux-amd64.tar.gzrm nerdctl-1.7.0-linux-amd64.tar.gz
# Verify installationnerdctl --versionGenerate Kubeconfig for External Access
# On remote cluster, create external kubeconfigkubectl config view --raw > /tmp/external-kubeconfig.yaml
# Get cluster's external IPEXTERNAL_IP=$(curl -s ifconfig.me)echo "Cluster external IP: $EXTERNAL_IP"
# Replace localhost with external IPsed -i "s|https://127.0.0.1:6443|https://$EXTERNAL_IP:6443|" /tmp/external-kubeconfig.yaml
# Skip TLS verification (development only!)kubectl config set-cluster cluster.local \ --insecure-skip-tls-verify=true \ --kubeconfig /tmp/external-kubeconfig.yaml
# Test from remote hostKUBECONFIG=/tmp/external-kubeconfig.yaml kubectl get nodesCopy Kubeconfig to Local Machine
# From your local machinescp -i ~/.ssh/your-key root@<CLUSTER_IP>:/tmp/external-kubeconfig.yaml ~/.kube/remote-cluster-config
# Set KUBECONFIGexport KUBECONFIG=~/.kube/remote-cluster-config
# Test connectionkubectl get nodesLocal Setup
STEP 1 - Navigate to SSH Directory
cd ~/go/src/github.com/akash-network/provider/_run/sshSTEP 2 - Configure Environment
Edit .envrc:
vim .envrcAdd/verify these settings:
source_up .envrcdotenv_if_exists dev.env
AP_RUN_NAME=$(basename "$(pwd)")AP_RUN_DIR="${DEVCACHE_RUN}/${AP_RUN_NAME}"
export AKASH_HOME="${AP_RUN_DIR}/.akash"export AKASH_KUBECONFIG=$KUBECONFIGexport AP_KUBECONFIG=$KUBECONFIGexport AP_RUN_NAMEexport AP_RUN_DIRexport KUBE_SSH_NODES="root@<YOUR_CLUSTER_IP>"Reload environment:
direnv allow
# Verifyecho "KUBE_SSH_NODES: $KUBE_SSH_NODES"echo "KUBECONFIG: $KUBECONFIG"STEP 3 - Initialize Environment
make initSTEP 4 - Set Up Remote Cluster
For standard workloads:
KUBE_ROLLOUT_TIMEOUT=300 make kube-cluster-setupFor GPU workloads:
KUBE_ROLLOUT_TIMEOUT=300 make kube-cluster-setup-gpuWhat this does:
- Creates namespaces
- Sets up ingress controller
- Installs Helm charts
- Configures GPU support (if GPU target)
STEP 5 - Start Services
Run these in separate terminals:
Terminal 1 - Start Node:
cd ~/go/src/github.com/akash-network/provider/_run/sshexport KUBECONFIG=~/.kube/remote-cluster-configdirenv reload
make node-runTerminal 2 - Create Provider:
cd ~/go/src/github.com/akash-network/provider/_run/sshexport KUBECONFIG=~/.kube/remote-cluster-configdirenv reload
make provider-createTerminal 3 - Run Provider:
cd ~/go/src/github.com/akash-network/provider/_run/sshexport KUBECONFIG=~/.kube/remote-cluster-configdirenv reload
make provider-runSTEP 6 - Test Deployment
Same commands as local Kind cluster:
make deployment-createmake query-deploymentsmake lease-createmake send-manifestmake provider-lease-statusSSH Cluster Troubleshooting
SSH Permission Denied:
- Verify SSH key is loaded:
ssh-add -l - Test SSH access:
ssh root@<CLUSTER_IP>
Kubeconfig Access Issues:
- Verify external IP is reachable
- Check firewall rules for port 6443
- Ensure TLS verification is skipped
Image Upload Failures:
- Verify nerdctl is installed on nodes
- Check containerd is running
- Test:
ssh root@<CLUSTER_IP> nerdctl version
Timeout Errors:
- Increase timeout:
KUBE_ROLLOUT_TIMEOUT=600 - Check network latency
- Verify cluster resources
Reset SSH Environment
cd ~/go/src/github.com/akash-network/provider/_run/sshmake initCommon Make Targets
Once any runbook is set up, these commands work across all environments:
Deployment Commands:
make deployment-create # Create test deploymentmake deployment-update # Update deploymentmake deployment-close # Close deploymentQuery Commands:
make query-deployments # List all deploymentsmake query-orders # List ordersmake query-bids # List bidsmake query-leases # List leasesmake query-providers # List providersLease Commands:
make lease-create # Create lease from bidmake send-manifest # Send manifest to providermake provider-lease-status # Check lease statusmake provider-lease-logs # View deployment logsmake provider-lease-ping # Test connectivityProvider Commands:
make provider-create # Register providermake provider-run # Start provider servicemake provider-stop # Stop providerNode Commands:
make node-run # Start local nodemake node-stop # Stop nodeTroubleshooting
Common Issues
Docker not running:
# macOSopen -a Docker
# Linuxsudo systemctl start dockerDirenv not loading:
# Check hook is configuredgrep direnv ~/.zshrc
# If missingecho 'eval "$(direnv hook zsh)"' >> ~/.zshrcsource ~/.zshrc
# Allow in projectdirenv allowPort already in use:
# Find process using portlsof -i :8080 # or other port
# Kill processkill -9 <PID>Kind cluster won’t start:
# List existing clusterskind get clusters
# Delete old clusterkind delete cluster --name akash
# Retry setupmake kube-cluster-setupBuild fails with Go version error:
# Set Go versionexport GOVERSION_SEMVER=v1.24.2
# Verifyecho $GOVERSION_SEMVER
# Retry buildmake kube-cluster-setupProvider won’t connect to node:
- Verify node is running in terminal2
- Check node logs for errors
- Ensure provider was created:
make query-providers
No bids on deployment:
- Check provider is running in terminal3
- Verify provider attributes match deployment requirements
- Check provider logs for errors
Debug Commands
# Check cluster statuskubectl get nodeskubectl get pods --all-namespaces
# Check kind clusterkind get clustersdocker ps
# View provider logsmake provider-logs
# View node logsmake node-logs
# Check blockchain statusmake query-block-resultsAdvanced Topics
Custom SDL Files
Place custom SDL files in _run/kube/deployment.yaml (or ssh/single):
version: "2.0"services: web: image: nginx:latest expose: - port: 80 to: - global: trueprofiles: compute: web: resources: cpu: units: 0.5 memory: size: 512Mi storage: size: 512Mi placement: akash: pricing: web: denom: uakt amount: 1000deployment: web: akash: profile: web count: 1Then deploy:
make deployment-createTesting Different Scenarios
Test bid rejection:
# Set very low pricingDSEQ=1 make deployment-create# Provider should reject bidTest multiple deployments:
DSEQ=1 make deployment-createDSEQ=2 make deployment-createDSEQ=3 make deployment-createmake query-deploymentsTest deployment updates:
make deployment-create# Modify deployment.yamlmake deployment-updateNext Steps
After setup:
- Explore
_run/kube/Makefileto see all available targets - Read provider logs to understand bidding logic
- Experiment with different SDL configurations
- Test various deployment scenarios
Other Development Guides:
- Console & Website Setup - Web development (easier)
- Getting Started - Make your first contribution
- Code Conventions - Coding standards
Resources:
- Node Repository - Blockchain node source
- Provider Repository - Provider services source
Editor Setup
VS Code (Recommended)
Install Go extension:
code --install-extension golang.goWorkspace settings (.vscode/settings.json):
{ "go.formatTool": "goimports", "go.lintTool": "golangci-lint", "go.useLanguageServer": true, "editor.formatOnSave": true, "[go]": { "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.organizeImports": true } }, "go.testFlags": ["-v"], "go.testTimeout": "10s"}GoLand (Recommended for Go Development)
- Open provider or node directory
- Configure Go SDK - Point to your Go 1.25+ installation
- Enable gofmt on save - Settings → Tools → File Watchers
- Set up golangci-lint - Settings → Tools → golangci-lint
- Configure Kubernetes - Settings → Languages & Frameworks → Kubernetes
- Enable Direnv - Settings → Plugins → Install Direnv plugin
Common Development Tools
Make Commands
All Akash Go projects use Makefiles:
# View all available commandsmake help
# Run testsmake test
# Run lintermake lint
# Build binariesmake build
# Clean build artifactsmake clean
# Install dependenciesmake cacheGit Workflow
# Keep your fork updatedgit fetch upstreamgit checkout maingit merge upstream/main
# Create feature branchgit checkout -b feature/your-feature
# Make changes, commit, pushgit add .git commit -s -m "feat: your change"git push origin feature/your-featureTesting
Run all tests:
make testRun specific package tests:
go test ./pkg/specific-packagego test ./bidengine/...Run with coverage:
make test-coverageIntegration tests:
make test-integrationVerbose output:
go test -v ./...Troubleshooting
”Command not found” Errors
Problem: go, make, or node not in PATH
Solution:
# macOS - Add to ~/.zshrcexport PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
# Linux - Add to ~/.bashrcexport PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
# Reloadsource ~/.zshrc # or ~/.bashrcMake Version Too Old (macOS)
Problem: make: unrecognized option '--version'
Solution:
brew install makeexport PATH="/usr/local/opt/make/libexec/gnubin:$PATH"Go Module Issues
Problem: go: module not found
Solution:
# Clear module cachego clean -modcache
# Re-download dependenciesgo mod download
# Verify go.modgo mod verifyDirenv Not Working
Problem: Environment variables not loading
Solution:
# Re-allow direnvdirenv allow
# Check hook is installedgrep direnv ~/.zshrc # or ~/.bashrc
# If missing, add:eval "$(direnv hook zsh)" # or bashPort Already in Use
Problem: Dev server won’t start (port 3000 or 4321)
Solution:
# Find process using portlsof -i :3000 # or :4321
# Kill processkill -9 <PID>
# Or use different portnpm run dev -- --port 3001Permission Denied
Problem: Can’t write to directories
Solution:
# Fix ownership (macOS/Linux)sudo chown -R $USER:$USER ~/path/to/repo
# Or use sudo for npm (not recommended)# Instead, fix npm permissions:mkdir ~/.npm-globalnpm config set prefix '~/.npm-global'export PATH=~/.npm-global/bin:$PATHIDE Debugging
VS Code - Go Debugging
Create .vscode/launch.json:
{ "version": "0.2.0", "configurations": [ { "name": "Launch Package", "type": "go", "request": "launch", "mode": "auto", "program": "${fileDirname}" }, { "name": "Attach to Process", "type": "go", "request": "attach", "mode": "local", "processId": "${command:pickProcess}" } ]}VS Code - Node.js Debugging
Create .vscode/launch.json:
{ "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Next.js: debug server-side", "runtimeExecutable": "npm", "runtimeArgs": ["run", "dev"], "port": 9229 } ]}Performance Tips
Speed Up Go Builds
# Use build cacheexport GOCACHE=$HOME/.cache/go-build
# Parallel buildsmake -j8 buildSpeed Up npm installs
# Use pnpm (faster alternative)npm install -g pnpmpnpm install
# Or use npm ci for clean installsnpm ciNext Steps
Environment set up? Great!
- Getting Started - Make your first contribution
- Code Conventions - Learn coding standards
- Pull Request Process - Submit your changes
Need help? Ask in Discord #developers!