Microsoft Dev Tunnels
Azure-native tunnels designed for development with GitHub/Microsoft auth integration.
Prerequisites
- Microsoft or GitHub account
- Dev Tunnel access token
Setup
1. Get Access Token
Generate a tunnel access token using the devtunnel CLI:
# Install devtunnel CLI
winget install Microsoft.devtunnel # Windows
brew install --cask devtunnel # macOS
# Login and create token
devtunnel user login
devtunnel token create --scope connect2. Create Secret
kubectl create secret generic devtunnel-token \
--from-literal=token=YOUR_TOKEN \
-n ktube-system3. Create TunnelProvider
kubectl apply -f - <<EOF
apiVersion: ktube.dev/v1alpha1
kind: TunnelProvider
metadata:
name: devtunnel-provider
spec:
type: devtunnels
devtunnels:
accessTokenSecretRef:
name: devtunnel-token
namespace: ktube-system
key: token
EOF4. Create Tunnel and Binding
kubectl apply -f - <<EOF
apiVersion: ktube.dev/v1alpha1
kind: Tunnel
metadata:
name: dev-tunnel
spec:
providerRef:
name: devtunnel-provider
---
apiVersion: ktube.dev/v1alpha1
kind: TunnelBinding
metadata:
name: dev-binding
spec:
tunnelRef:
name: dev-tunnel
protocol: http
service:
name: my-service
port: 8080
EOFFeatures
- GitHub auth: Users can authenticate with GitHub accounts
- VS Code integration: Works with VS Code Dev Tunnels extension
- Azure integration: Native integration with Azure services
Limitations
- No custom domains
- URLs are devtunnels.ms subdomains only
- Primarily designed for development, not production
Use Cases
Dev Tunnels is best for:
- Temporary development tunnels
- Sharing local services with teammates
- VS Code remote development
- Azure-integrated workflows