Can volumeMounts: in kubernetes pod be optional

Goutam

I have certain requirements where volumeMounts: should be an optional field.

spec:
      volumes:
        -
          name: aaa
          secret:
            secretName: aaa-certs
      containers:
        -
          name: my-celery
          volumeMounts:
            -
              name: aaa
              mountPath: /tmp/aaa_certs
              readOnly: true

If secret is present then it will mount, else create an empty folder. Is this possible

Parshad

Secret volumes can be marked as optional using tag "optional: true", and result in empty directories if the associated secret doesn't exist, rather than blocking pod startup.

Example:

spec:
      volumes:
        -
          name: aaa
          secret:
            secretName: aaa-certs
            optional: true
      containers:
        -
          name: my-celery
          volumeMounts:
            -
              name: aaa
              mountPath: /tmp/aaa_certs
              readOnly: true

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Kubernetes can telnet into POD but can't curl web content

分類Dev

Can I mount a GCS bucket inside Kubernetes Pod?

分類Dev

how to stop/pause a pod in kubernetes

分類Dev

Kubernetes pod auto-scaling

分類Dev

Kubernetes - Get EBS Volume of a Pod

分類Dev

Kubernetes MLflow Service Pod Connection

分類Dev

Running bash script in a kubernetes pod

分類Dev

Kubernetes、VolumeMountsはディレクトリではなく、ファイルです

分類Dev

volumeMountsは可能ですか:kubernetesポッドではオプションです

分類Dev

Prometheus with multi-container pod on kubernetes

分類Dev

Azure Kubernetes - not able to connect pod containers

分類Dev

Save file to Kubernetes pod during deployment

分類Dev

Two containers within same pod on Kubernetes

分類Dev

Monitor custom kubernetes pod metrics using Prometheus

分類Dev

How to Configure Pod initialization in a specific order in Kubernetes?

分類Dev

How to connect to a private IP from Kubernetes Pod

分類Dev

Kubernetes Horizontal Pod Autoscaler(HPA)テスト

分類Dev

Access built-in etcd within kubernetes pod container

分類Dev

Logging to Stackdriver from Google Cloud Endpoints in Kubernetes pod

分類Dev

How to map one single file into kubernetes pod using hostPath?

分類Dev

JobとPodのactiveDeadlineSecondsのKubernetesの違い

分類Dev

Kubernetes sends traffic to the pod even after sending SIGTERM

分類Dev

How to (properly) Deploy MongoDB on Kubernetes and Access it from Another Pod/Job?

分類Dev

kubernetes - route ingress traffic to specific pod for some paths

分類Dev

Copy file inside Kubernetes pod from another container

分類Dev

in kubernetes how to print current pod rc and service configuration?

分類Dev

Can not add FBSDKLoginKit to the Pod in Swift 4

分類Dev

Optional can only be applied to members of an @objc protocol

分類Dev

Kubernetes can not list pods as user

Related 関連記事

  1. 1

    Kubernetes can telnet into POD but can't curl web content

  2. 2

    Can I mount a GCS bucket inside Kubernetes Pod?

  3. 3

    how to stop/pause a pod in kubernetes

  4. 4

    Kubernetes pod auto-scaling

  5. 5

    Kubernetes - Get EBS Volume of a Pod

  6. 6

    Kubernetes MLflow Service Pod Connection

  7. 7

    Running bash script in a kubernetes pod

  8. 8

    Kubernetes、VolumeMountsはディレクトリではなく、ファイルです

  9. 9

    volumeMountsは可能ですか:kubernetesポッドではオプションです

  10. 10

    Prometheus with multi-container pod on kubernetes

  11. 11

    Azure Kubernetes - not able to connect pod containers

  12. 12

    Save file to Kubernetes pod during deployment

  13. 13

    Two containers within same pod on Kubernetes

  14. 14

    Monitor custom kubernetes pod metrics using Prometheus

  15. 15

    How to Configure Pod initialization in a specific order in Kubernetes?

  16. 16

    How to connect to a private IP from Kubernetes Pod

  17. 17

    Kubernetes Horizontal Pod Autoscaler(HPA)テスト

  18. 18

    Access built-in etcd within kubernetes pod container

  19. 19

    Logging to Stackdriver from Google Cloud Endpoints in Kubernetes pod

  20. 20

    How to map one single file into kubernetes pod using hostPath?

  21. 21

    JobとPodのactiveDeadlineSecondsのKubernetesの違い

  22. 22

    Kubernetes sends traffic to the pod even after sending SIGTERM

  23. 23

    How to (properly) Deploy MongoDB on Kubernetes and Access it from Another Pod/Job?

  24. 24

    kubernetes - route ingress traffic to specific pod for some paths

  25. 25

    Copy file inside Kubernetes pod from another container

  26. 26

    in kubernetes how to print current pod rc and service configuration?

  27. 27

    Can not add FBSDKLoginKit to the Pod in Swift 4

  28. 28

    Optional can only be applied to members of an @objc protocol

  29. 29

    Kubernetes can not list pods as user

ホットタグ

アーカイブ