infra/clusters/aprs/setup-ghcr-auth.md

906 B

Setting up GitHub Container Registry Authentication

Step 1: Create GitHub Personal Access Token

  1. Go to https://github.com/settings/tokens/new
  2. Name: "k3s-ghcr-pull" (or any name you prefer)
  3. Expiration: Choose based on your security requirements
  4. Scopes: Select read:packages
  5. Click "Generate token"
  6. Copy the token (starts with ghp_)

Step 2: Create Kubernetes Secret

Replace YOUR_GITHUB_USERNAME and YOUR_GITHUB_PAT in the command below:

kubectl create secret docker-registry ghcr-pull-secret \
  --docker-server=ghcr.io \
  --docker-username=YOUR_GITHUB_USERNAME \
  --docker-password=YOUR_GITHUB_PAT \
  --namespace=aprs

Step 3: Verify Secret

kubectl get secret ghcr-pull-secret -n aprs

Step 4: The deployment will be automatically updated to use this secret

The aprs-deployment.yaml already includes the imagePullSecrets configuration.