Skip to content

Instantly share code, notes, and snippets.

@jwsy
Last active October 5, 2022 18:38
Show Gist options
  • Save jwsy/c22e463b2f91eccea720736f763dd626 to your computer and use it in GitHub Desktop.
Save jwsy/c22e463b2f91eccea720736f763dd626 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: jade-shooter
labels:
app: jade-shooter
spec:
replicas: 1
selector:
matchLabels:
app: jade-shooter
template:
metadata:
labels:
app: jade-shooter
spec:
containers:
- name: jade-shooter0
image: jwsy/jade-shooter:v1.1
resources:
limits:
memory: "128Mi"
cpu: "200m"
ports:
- containerPort: 80
volumeMounts:
- name: host-mount
mountPath: /usr/share/nginx/html/static
volumes:
- name: host-mount
hostPath:
path: /Users/jyee/code/simplest-k8s/host-mount
# Reference: https://docs.rancherdesktop.io/faq/#q-does-file-sharing-work-similarly-to-docker-desktop-do-i-have-to-do-any-additional-configuration-to-mount-volumes-to-vms
# https://kubernetes.io/docs/concepts/storage/volumes/#hostpath
# Linux: /home/yourusername/path/to/repo/simplest-k8s/host-mount
# macOS: /Users/yourusername/path/to/repo/simplest-k8s/host-mount
# either Linux or macOS: /tmp/rancher-desktop/path/to/repo/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment