10 lines
367 B
Bash
10 lines
367 B
Bash
|
|
#!/usr/bin/env bash
|
||
|
|
|
||
|
|
# Check if there are any pods in the longhorn-system namespace
|
||
|
|
if kubectl -n longhorn-system get pods --no-headers 2>/dev/null | grep -q '^[^ ]'; then
|
||
|
|
echo "Pods already exist in the longhorn-system namespace. Skipping installation."
|
||
|
|
exit 0
|
||
|
|
fi
|
||
|
|
|
||
|
|
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.8.1/deploy/longhorn.yaml
|