- Dockerfile for claudebox with Claude Code CLI - Kustomize manifests for k3s deployment - Scripts for credentials, deploy, and verify - README with quick start guide Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# Create Kubernetes secret from local Claude credentials
|
|
# Run this after authenticating with `claude login` locally
|
|
|
|
set -e
|
|
|
|
# Ensure kubeconfig is set
|
|
if [[ -z "$KUBECONFIG" ]]; then
|
|
echo "Error: KUBECONFIG not set"
|
|
echo "Run: export KUBECONFIG=~/.kube/orchard9-k3sf.yaml"
|
|
exit 1
|
|
fi
|
|
|
|
# Check if Claude credentials exist
|
|
CLAUDE_DIR="$HOME/.claude"
|
|
if [[ ! -d "$CLAUDE_DIR" ]]; then
|
|
echo "Error: Claude credentials not found at $CLAUDE_DIR"
|
|
echo "Run 'claude login' first to authenticate"
|
|
exit 1
|
|
fi
|
|
|
|
# Create namespace if it doesn't exist
|
|
kubectl create namespace rdev --dry-run=client -o yaml | kubectl apply -f -
|
|
|
|
# Create secret from the .claude directory
|
|
echo "Creating claude-credentials secret from $CLAUDE_DIR..."
|
|
|
|
# We need to create the secret with all files in ~/.claude
|
|
kubectl create secret generic claude-credentials \
|
|
--namespace=rdev \
|
|
--from-file="$CLAUDE_DIR" \
|
|
--dry-run=client -o yaml | kubectl apply -f -
|
|
|
|
echo "Secret created successfully!"
|
|
echo ""
|
|
echo "Verify with:"
|
|
echo " kubectl get secret claude-credentials -n rdev"
|