Connecting Kubernetes Clusters - Step-by-Step Guide | Nife Deploy
Learn how to connect your Kubernetes clusters to Nife using standalone or BYOC options.
Before You Begin#
Requirements:
- Admin access to your Kubernetes cluster
- Kubeconfig file (for standalone clusters)
- Cloud credentials (for BYOC)
- Network connectivity to your cluster
Connecting a Standalone Cluster#
A standalone cluster is your own Kubernetes cluster that you manage.
Step 1: Prepare Your Kubeconfig#
- Get your kubeconfig file from your cluster administrator
- The file typically contains:
- Cluster endpoint
- Authentication credentials
- Context information
Location of kubeconfig:
- Linux/Mac:
~/.kube/config - Windows:
%USERPROFILE%\.kube\config
Step 2: Start the Connection#
- Go to Clusters page
- Click Connect Cluster button
- Select Standalone Cluster
Step 3: Fill in Details#
Cluster Name:
- Give your cluster a descriptive name
- Example: "Production API Cluster"
- Used for easy identification
Region Code:
- Select the region where your cluster runs
- Examples:
us-east-1,eu-west-1 - Important for global deployments
Kubeconfig Content:
- Paste your kubeconfig file content
- OR upload the kubeconfig file directly
Step 4: Verify Connection#
- Nife will validate the kubeconfig
- Test connection to the cluster
- Once confirmed, cluster appears in your list
Troubleshooting Connection#
Problem: Connection Failed
Possible causes:
- Invalid kubeconfig format
- Cluster unreachable
- Authentication failed
- Network connectivity issue
Solutions:
- Verify kubeconfig is valid
- Check cluster is running and accessible
- Verify network allows outbound connections
- Check credentials in kubeconfig
- Try uploading kubeconfig file again
Connecting with BYOC (Cloud Providers)#
BYOC allows you to connect cloud infrastructure directly.
Supported Cloud Providers#
Amazon Web Services (AWS)#
What you need:
- AWS account with cluster access
- IAM credentials (Access Key & Secret Key)
Steps:
- Go to Clusters โ Connect Cluster
- Select BYOC โ AWS
- Enter AWS credentials:
- Access Key ID
- Secret Access Key
- Choose existing cluster or create new
- Click Connect
Permissions Required:
- EC2 access
- EKS cluster access
- IAM role permissions
Google Cloud Platform (GCP)#
What you need:
- GCP project with GKE cluster
- Service account JSON key
Steps:
- Go to Clusters โ Connect Cluster
- Select BYOC โ GCP
- Upload service account JSON key
- Select cluster from dropdown
- Click Connect
Permissions Required:
- GKE cluster access
- Container API enabled
- Service account with cluster admin
Microsoft Azure#
What you need:
- Azure subscription with AKS cluster
- Service principal or managed identity
Steps:
- Go to Clusters โ Connect Cluster
- Select BYOC โ Azure
- Enter credentials:
- Subscription ID
- Tenant ID
- Client ID
- Client Secret
- Select cluster from list
- Click Connect
Permissions Required:
- AKS cluster access
- Azure Role-Based Access Control (RBAC)
After Connecting#
What Happens Next#
- Validation: Nife validates cluster access
- Registration: Cluster is registered to your organization
- Agent Deployment: You can now deploy agents
- Monitoring: Cluster appears in your dashboard
Next Steps#
- Deploy an Agent: Enable monitoring and additional features
- Configure Cluster: Set region and other preferences
- Deploy Applications: Start deploying to your cluster
Managing Connected Clusters#
View Cluster Details#
- Go to Clusters page
- Click cluster name or View Details
- See:
- Cluster configuration
- Deployed agents
- Connected status
- Resource information
Set Default Cluster#
- Select cluster from list
- Click Set as Default
- Default cluster is used for new deployments
Disconnect a Cluster#
- Find cluster in list
- Click menu (three dots) โ Disconnect
- Confirm disconnection
- Cluster is removed from Nife (but not deleted from your infrastructure)
Warning: Disconnecting doesn't delete your cluster, only removes it from Nife.
Update Cluster Configuration#
- Click Edit on cluster
- Update:
- Cluster name
- Region
- Additional settings
- Click Save
Cluster List View Modes#
Card View (Default)#
Shows clusters as cards with:
- Cluster name and status
- Region information
- Agent count
- Quick action buttons
Best for:
- Visual overview
- Quick status checks
- Small number of clusters
Grid View#
Shows clusters in a table format with:
- Columns for name, region, status
- Sortable headers
- Detailed information
Best for:
- Large number of clusters
- Comparing details
- Quick data lookup
Switch View Mode#
- Top right: Click Grid or Card button
- View mode updates immediately
- Your preference is saved
Common Cluster Connection Issues#
Issue: Invalid Kubeconfig#
Symptoms:
- Connection fails immediately
- Error message about invalid format
Solution:
- Verify kubeconfig syntax
- Check file is not corrupted
- Try different kubeconfig version
- Test with
kubectlcommand first
Issue: Authentication Failed#
Symptoms:
- Connection succeeds but operations fail
- Permission denied errors
Solution:
- Verify credentials in kubeconfig
- Check token hasn't expired
- Verify user has cluster admin
- Try refreshing credentials
Issue: Cluster Unreachable#
Symptoms:
- Connection timeout
- Network unreachable errors
Solution:
- Check cluster is running
- Verify network allows outbound HTTPS
- Check firewall rules
- Test ping/curl to cluster endpoint
Issue: Region Not Available#
Symptoms:
- Cannot select desired region
- Region dropdown is empty
Solution:
- Request region in Requested tab
- Wait for region approval
- Select from available regions
- Use closest available region temporarily
Best Practices#
1. Naming Convention#
Use clear, descriptive names:
- โ "Production API Cluster - US East"
- โ "Staging Database Cluster - EU"
- โ "Cluster 1"
- โ "Test"
2. Organize by Region#
Keep clusters organized geographically for easier management.
3. Regular Verification#
Periodically check that clusters are still connected and healthy.
4. Credential Security#
- Store credentials securely
- Rotate credentials regularly
- Don't share kubeconfig files
- Use IAM roles when possible
5. Network Security#
- Use private endpoints when available
- Restrict cluster access by IP
- Enable encryption for connections
- Monitor access logs
Next Steps#
- Deploy Agents - Enable monitoring
- Manage Resources - Monitor cluster health
- Deploy Applications - Start using your cluster
Support#
Having trouble connecting?
- Check the troubleshooting section above
- Review your cloud provider's documentation
- Contact support: [email protected]