티스토리 뷰

Kubernetes share a directory from your local system to kubernetes container

 

Kubernetes share a directory from your local system to kubernetes container

Is there any way to share the directory/files to kubernetes container from your local system? I have a deployment yaml file. I want to share the directory without using kubectl cp. I tried with

stackoverflow.com

 

example

 

apiVersion: apps/v1
kind: Deployment
metadata:
  name: tfx-deployment
  labels:
    app: tfx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: tfx
  template:
    metadata:
      labels:
        app: tfx
    spec:
      containers:
      - name: tfx
        image: tensorflow/serving:latest
        ports:
        - containerPort: 8501
        volumeMounts:
        - name: model-storage
          mountPath: /models/model


      volumes:
      - name: model-storage
        hostPath:
          path: /models/model

 

 

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함