티스토리 뷰
Kubernetes share a directory from your local system to kubernetes container
sngjuk 2020. 3. 17. 19:32Kubernetes 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