906 B
906 B
Setting up GitHub Container Registry Authentication
Step 1: Create GitHub Personal Access Token
- Go to https://github.com/settings/tokens/new
- Name: "k3s-ghcr-pull" (or any name you prefer)
- Expiration: Choose based on your security requirements
- Scopes: Select
read:packages - Click "Generate token"
- 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.