Skip to content

Instantly share code, notes, and snippets.

@rms1000watt
Last active February 19, 2022 00:01
Show Gist options
  • Save rms1000watt/f472c210c00dd64f0e08b972a4fd6703 to your computer and use it in GitHub Desktop.
Save rms1000watt/f472c210c00dd64f0e08b972a4fd6703 to your computer and use it in GitHub Desktop.
test container in k8s
apiVersion: v1
kind: Pod
metadata:
name: test-pod
namespace: default
spec:
containers:
- image: nginx:1.21-alpine
name: test-container
volumeMounts:
- mountPath: /etc/docker-host
name: etc-docker-host
readOnly: true
- mountPath: /var/log-host
name: var-log-host
readOnly: true
- mountPath: /var/lib-host
name: var-lib-host
readOnly: true
volumes:
- name: var-log-host
hostPath:
path: /var/log
type: Directory
- name: var-lib-host
hostPath:
path: /var/lib
type: Directory
- name: etc-docker-host
hostPath:
path: /etc/docker
type: Directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment