apiVersion: v1
kind: Pod
metadata:
  name: busybox-pod
  labels:
     test: busybox
spec:
  containers:
  # 第一个容器
  - name: hello-write
    image: latelee/busybox
    command: ["sh","-c","for i in {1..10};do echo $i >> /data/hello;sleep 1;done;sleep 5700"]
  # 第二个容器
  - name: hello-read
    image: latelee/busybox
    command: ["sh","-c","for i in {1..10};do cat $i >> /data/hello;sleep 1;done;sleep 5700"]
    volumeMounts:
      - name: data
        mountPath: /data
  # 数据卷
  volumes:
  - name: data
    hostPath:
      path: /data
