Skip to content

Instantly share code, notes, and snippets.

@flyotlin
Created August 5, 2022 14:48
Show Gist options
  • Save flyotlin/fbc86aea540b83d9b84615dc27333489 to your computer and use it in GitHub Desktop.
Save flyotlin/fbc86aea540b83d9b84615dc27333489 to your computer and use it in GitHub Desktop.

Revisions

  1. flyotlin created this gist Aug 5, 2022.
    24 changes: 24 additions & 0 deletions my-app-deployment.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    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