Browse your Git repositories
#!/bin/bash
# Create Kubernetes secret for Harbor registry access
echo "Create Kubernetes secret for Harbor registry"
echo ""
read -p "Harbor Username: " username
read -s -p "Harbor Password: " password
echo ""
read -p "Namespace (default: default): " namespace
namespace=${namespace:-default}
kubectl create secret docker-registry harbor-registry-secret \
--docker-server=harbor.kratov.luiv.dev \
--docker-username="$username" \
--docker-password="$password" \
--namespace="$namespace"
if [ $? -eq 0 ]; then
echo ""
echo "✅ Secret 'harbor-registry-secret' created successfully in namespace '$namespace'"
echo ""
echo "You can now deploy the app with:"
echo "kubectl apply -f kubernetes.yaml"
else
echo "❌ Failed to create secret"
exit 1
fi