Skip to content

Instantly share code, notes, and snippets.

@drnic
Created September 20, 2019 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drnic/d35eddbef009b2eb8495218a29d4e263 to your computer and use it in GitHub Desktop.
Save drnic/d35eddbef009b2eb8495218a29d4e263 to your computer and use it in GitHub Desktop.
Sample Kubernetes serviceaccount including GitHub (remember to use Personal Auth Token, not Username/Password if you've got 2FA enabled) and Docker Hub. Used for a kpack demonstration.
---
apiVersion: v1
kind: Secret
metadata:
name: dockerhub
annotations:
build.pivotal.io/docker: index.docker.io
type: kubernetes.io/basic-auth
stringData:
username: <username/email>
password: <password>
---
apiVersion: v1
kind: Secret
metadata:
name: github
annotations:
build.pivotal.io/git: https://github.com
type: kubernetes.io/basic-auth
stringData:
username: <github personal token>
password: ""
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: service-account
secrets:
- name: dockerhub
- name: github
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment