Installation Problems

πŸ—„οΈ Database Connection Failed

Error

RCABench cannot connect to the database, causing API failures and health check errors.

Symptoms

  • API returns database connection errors
  • Health check endpoint fails
  • MySQL connection timeouts

Solutions

Click to see the whole script

Step 1: Check MySQL Pod Status

kubectl get pods -l app=mysql -n exp

Step 2: Examine MySQL Logs

kubectl logs deployment/mysql -n exp --tail=50

Step 3: Verify Database Credentials

kubectl get secret rcabench-db-secret -o yaml -n exp

Step 4: Test Database Connection

kubectl exec -it deployment/mysql -n exp -- mysql -u root -p rcabench

☸️ Pod Scheduling Issues

Error

Kubernetes pods cannot be scheduled due to resource constraints or node issues.

Symptoms

  • Pods stuck in Pending state
  • Resource allocation errors
  • Node affinity conflicts

Solutions

Click to see the whole solutions

Step 1: Check Node Resources

kubectl describe nodes
kubectl top nodes  # if metrics-server is available

Step 2: Examine Pod Events

kubectl describe pod <pod-name> -n exp

Step 3: Review Resource Requirements

kubectl describe deployment rcabench -n exp | grep -A 10 "Requests\|Limits"

Step 4: Free Up Resources (if needed)

# Scale down non-essential workloads
kubectl scale deployment <deployment-name> --replicas=0 -n <namespace>

πŸ“¦ Image Pull Errors

Error

Kubernetes cannot pull container images from the registry.

Symptoms

  • ImagePullBackOff errors
  • ErrImagePull status
  • Authentication failures

Solutions

Click to see the whole script

Step 1: Verify Image Availability

# Test image pull manually
docker pull <image-name>:<tag>

Step 2: Check Registry Credentials

kubectl get secret rcabench-registry-secret -n exp -o yaml

Step 3: Review Image Pull Policy

kubectl get deployment rcabench -o yaml -n exp | grep imagePullPolicy

Step 4: Update Registry Secret (if needed)

kubectl create secret docker-registry rcabench-registry-secret \
  --docker-server=<registry-url> \
  --docker-username=<username> \
  --docker-password=<password> \
  --docker-email=<email> \
  -n exp

πŸ” Permission Errors

Error

RBAC permission issues prevent RCABench from accessing Kubernetes resources.

Symptoms

  • RBAC permission denied errors
  • Unauthorized access errors
  • API server rejecting requests

Solutions

Click to see the whole script

Step 1: Check Current Permissions

kubectl auth can-i create pods --namespace=exp
kubectl auth can-i get deployments --namespace=exp

Step 2: Apply RBAC Configuration

kubectl apply -f manifests/rbac.yaml

Step 3: Verify Service Account

kubectl get serviceaccount rcabench -n exp
kubectl describe serviceaccount rcabench -n exp

Step 4: Check Role Bindings

kubectl get rolebindings -n exp
kubectl describe rolebinding rcabench-binding -n exp

🌐 Network Connectivity Issues

Error

Network communication between services fails due to connectivity or DNS issues.

Symptoms

  • Service unreachable errors
  • Connection timeouts
  • DNS resolution failures

Solutions

Click to see the whole script

Step 1: Check Service Endpoints

kubectl get endpoints -n exp
kubectl get services -n exp

Step 2: Test Internal Connectivity

# Run a debug pod
kubectl run debug-pod --rm -i --tty --image=nicolaka/netshoot -- /bin/bash

# Inside the pod, test DNS resolution
nslookup rcabench-service.exp.svc.cluster.local

# Test HTTP connectivity
curl -v http://rcabench-service.exp.svc.cluster.local:8082/health

Step 3: Check Network Policies

kubectl get networkpolicies -n exp
kubectl describe networkpolicy <policy-name> -n exp

Step 4: Verify Ingress Configuration

kubectl get ingress -n exp
kubectl describe ingress rcabench-ingress -n exp

πŸ†˜ Getting Help

If you encounter issues not covered here:

  1. Check logs: make logs or kubectl logs -f deployment/rcabench -n exp
  2. Verify configuration: Review your hugo.toml file
  3. Resource monitoring: Check CPU/memory usage with kubectl top pods -n exp

πŸ†˜ Still Having Issues?

If you’re still experiencing problems after trying these solutions:

Important

When reporting issues, include your system information, error logs, and steps to reproduce the problem.