Skip to content

Instantly share code, notes, and snippets.

@prongbang
Last active April 28, 2024 08:46
Show Gist options
  • Save prongbang/7c8a17a493fcabecc01ac4a949194243 to your computer and use it in GitHub Desktop.
Save prongbang/7c8a17a493fcabecc01ac4a949194243 to your computer and use it in GitHub Desktop.

Create Token

https://github.com/settings/tokens

read:packages

Create Secret

kubectl create secret docker-registry mysecretname --docker-server=https://ghcr.io --docker-username=mygithubusername --docker-password=mygithubreadtoken --docker-email=mygithubemail

Pod

apiVersion: v1
kind: Pod
metadata:
  name: name
spec:
  containers:
  - name: name
    image: ghcr.io/username/imagename:label
    imagePullPolicy: Always
  imagePullSecrets:
  - name: mysecretname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment