Skip to content

Instantly share code, notes, and snippets.

@peakwinter
Created January 28, 2020 19:46
Show Gist options
  • Save peakwinter/997386cec2ed14f2d8b4d74e32282c2f to your computer and use it in GitHub Desktop.
Save peakwinter/997386cec2ed14f2d8b4d74e32282c2f to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ConfigMap
metadata:
name: mk-test-cfgmap
data:
VOLUME_MOUNT_PATH: /data
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mk-test-deployment
labels:
app: mk-test-pod
spec:
replicas: 1
selector:
matchLabels:
app: mk-test-pod
template:
metadata:
labels:
app: mk-test-pod
spec:
containers:
- name: mk-test-pod
image: peakwinter/minikube-volume-test:latest
envFrom:
- configMapRef:
name: mk-test-cfgmap
volumeMounts:
- mountPath: /data
name: mk-test-volume
volumes:
- name: mk-test-volume
hostPath:
path: /Users/jacobcook/Temp/minikube-volume
type: Directory
---
apiVersion: v1
kind: Service
metadata:
name: minikube-test-service
spec:
type: NodePort
selector:
app: mk-test-pod
ports:
- protocol: TCP
port: 3000
targetPort: 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment