Created
August 5, 2022 14:48
-
-
Save flyotlin/fbc86aea540b83d9b84615dc27333489 to your computer and use it in GitHub Desktop.
k8s deployment with image on private registry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: my-app | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: my-app | |
| template: | |
| metadata: | |
| labels: | |
| app: my-app | |
| spec: | |
| containers: | |
| - name: my-app | |
| # image 在 private registry 的位置以及 tag | |
| image: registry.gitlab.com/flyotlin/my-app/my-app:latest | |
| resources: | |
| limits: | |
| memory: "128Mi" | |
| cpu: "500m" | |
| # 讓 private registry authenticate k8s | |
| imagePullSecrets: | |
| - name: regcred |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment