在测试验证K8S容器的时候,经常会使用busybox,下面是k8s部署busybox编排文件,方便参考:
apiVersion: apps/v1 kind: Deployment metadata: name: busybox namespace: default spec: selector: matchLabels: app: busybox replicas: 2 template: metadata: labels: run: busybox spec: containers: - name: busybox image: busybox:latest args: - /bin/sh - -c - sleep 10; touch /tmp/healthy; sleep 30000 readinessProbe: exec: command: - cat - /tmp/healthy initialDelaySeconds: 10 periodSeconds: 5