Last active
September 7, 2022 15:46
-
-
Save alperen-selcuk/fbb1eb758ff79666a1390e06c6ea1ccb to your computer and use it in GitHub Desktop.
cka questions sidecar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
public