Common Issues & Solutions
1. Pods Stuck in ContainerCreating
Symptom:
1
shlink-db-xxx 0/1 ContainerCreating
Solution:
1
2
3
4
5
6
7
# Check events
kubectl describe pod -n shlink shlink-db-xxx
# Common causes:
# - Image pull (wait 1-2 minutes)
# - PVC not bound
# - Resource constraints
2. Database Connection Failed
Error: SQLSTATE[HY000] [2002] Connection refused
Solution:
1
2
3
4
5
6
7
8
9
# Check DB is running
kubectl get pods -n shlink -l app=shlink-db
# Check DB logs
kubectl logs -n shlink -l app=shlink-db
# Test connection
kubectl exec -n shlink $(kubectl get pod -n shlink -l app=shlink-db -o jsonpath='{.items[0].metadata.name}') \
-- mariadb -u shlink_user -pYOUR_PASSWORD shlink -e "SELECT 1"
3. Readiness Probe Failed
Error: Readiness probe failed: mysqladmin: executable file not found
Solution: Update probe to use TCP check:
1
2
3
4
readinessProbe:
tcpSocket:
port: 3306
initialDelaySeconds: 20
4. API Key Not Working
Solution:
1
2
3
4
5
6
# Get correct API key
kubectl get secret shlink-app-secret -n shlink -o jsonpath='{.data.INITIAL_API_KEY}' | base64 -d
# Test
curl https://sh.yourdomain.com/rest/health \
-H "X-Api-Key: YOUR_KEY"
5. Out of Memory
Symptom: OOMKilled
Solution:
1
2
3
4
5
6
7
# Increase limits
kubectl edit deployment shlink -n shlink
# Change:
resources:
limits:
memory: "1Gi" # Increase from 512Mi
