Skip to content

Instantly share code, notes, and snippets.

@alperen-selcuk
Last active September 7, 2022 15:46
Show Gist options
  • Save alperen-selcuk/fbb1eb758ff79666a1390e06c6ea1ccb to your computer and use it in GitHub Desktop.
Save alperen-selcuk/fbb1eb758ff79666a1390e06c6ea1ccb to your computer and use it in GitHub Desktop.
cka questions sidecar
apiVersion: v1
kind: Pod
metadata:
name: multi
spec:
containers:
- name: web
image: nginx:alpine
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: main
image: busybox:1.28
command: ["/bin/sh","-c","while true; do echo $(date) >> /logpath/data.log; sleep 1; done;"]
volumeMounts:
- mountPath: /logpath
name: log
- name: sidecar
image: busybox:1.28
command: ["/bin/sh","-c","tail -f /logpath/data.log"]
volumeMounts:
- mountPath: /logpath
name: log
volumes:
- name: log
emptyDir: {}
@alperen-selcuk
Copy link
Author

public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment