822 B
822 B
| title | date | draft | snippet_types | |
|---|---|---|---|---|
| creating k8s registry secrets | 2020-03-29T20:43:14+02:00 | false |
|
Hosting side projects in kubernetes and using gitlab container registry? This is the command I run to create the needed secret for the cluster to pull the image:
$ kubectl create secret docker-registry cool-project-gitlab \
--docker-server=registry.gitlab.com \
--docker-username=gitlab+deploy-token-666666 \
--docker-password=xxxxxxxxxxxxxxxxxxxx \
--docker-email=xxxxxxxxx@xmail.com
Then in the deployment.yml use the gitlab registry image and newly created image secret:
containers:
image: registry.gitlab.com/btbtravis/cool-project:0.0.1
imagePullPolicy: IfNotPresent
name: cool-project-api
imagePullSecrets:
- name: cool-projects-gitlab