Skip to content

Instantly share code, notes, and snippets.

@liweinan
Created July 3, 2023 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liweinan/867f308b36b0309b8f4c85b4ed449a51 to your computer and use it in GitHub Desktop.
Save liweinan/867f308b36b0309b8f4c85b4ed449a51 to your computer and use it in GitHub Desktop.
A Pod With Multiple Containers
kind: Pod
apiVersion: v1
metadata:
name: mc
spec:
containers:
- name: c0
image: ubuntu
command: [ "/bin/bash", "-c", "while true; do echo c0; sleep 5 ; done" ]
- name: c1
image: ubuntu
command: [ "/bin/bash", "-c", "while true; do echo c1; sleep 5 ; done" ]
@liweinan
Copy link
Author

liweinan commented Jul 3, 2023

image

@liweinan
Copy link
Author

liweinan commented Jul 3, 2023

➤ kubectl logs -f mc -c c0 | head -n 1                                                                                               23:54:48
c0
weli@192:~/Desktop
➤ kubectl logs -f mc -c c1 | head -n 1                                                                                               23:54:50
c1
weli@192:~/Desktop
➤

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