Add Cluster Configuration

This guide walks you through adding a new cluster to SNAP using the web interface.

Cluster Configuration Form

Step 1: Basic Cluster Information

Cluster Name

Cluster API URL

Authentication Token

Step 2: SSH Key Configuration

Upload SSH Key

How to generate SSH key:

# Generate new SSH key
ssh-keygen -t rsa -b 4096 -C "snap-cluster-access"

# Copy public key
cat ~/.ssh/id_rsa.pub

SSH Key Requirements:

Step 3: Registry Configuration

Registry Selection

Registry Benefits:

Step 4: Submit Configuration

Submit Button

Configuration Examples

Openshift Cluster

Cluster Name: openshift-prod
Cluster Api Url: https://api.openshift.company.com:6443
Token: sha256~your-openshift-token-here
Registry: nexus-registry

Kubernetes Cluster

Cluster Name: k8s-staging
Cluster Api Url: https://k8s-api.company.com:6443
Token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Registry: harbor-registry

Amazon EKS

Cluster Name: eks-production
Cluster Api Url: https://EKS_CLUSTER_ID.us-west-2.eks.amazonaws.com
Token: k8s-aws-v1.eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Registry: amazon-ecr

Post-Configuration Steps

1. Deploy Cluster Monitor DaemonSet

kubectl apply -f SnapApi/snap-cluster-monitor-daemonset.yaml

2. Verify Cluster Connection

# Test cluster connectivity
kubectl cluster-info

# Check node status
kubectl get nodes -o wide

3. Enable Checkpointing

curl -X POST http://localhost:8000/cluster/enable_checkpointing \
  -H "Content-Type: application/json" \
  -d '{
    "cluster_name": "your-cluster-name",
    "node_names": ["worker-node-1", "worker-node-2"]
  }'

4. Start SnapWatcher Operator

  1. Navigate to Operator > Start SnapWatcher
  2. Select your cluster
  3. Click Start SnapWatcher

Troubleshooting Cluster Addition

Common Issues

Connection Failed

Authentication Failed

SSH Key Issues

Registry Connection Failed

Validation Steps

  1. Test API Connection:
    kubectl cluster-info
    kubectl get nodes
    
  2. Verify Permissions:
    kubectl auth can-i create pods
    kubectl auth can-i get nodes
    kubectl auth can-i create daemonsets
    
  3. Check SSH Access:
    ssh user@node-ip "sudo systemctl status crio"
    
  4. Test Registry Access:
    docker login your-registry.com
    docker pull hello-world
    docker push your-registry.com/hello-world
    

Best Practices

Security

Performance

Reliability