busybox是一个包含了nslookup,ping,wget等网络处理命令的Pod容器(不含curl命令),它的体积非常小,适合做一些容器内的网络调试。

  • 编辑busybox.yaml
apiVersion: v1
kind: Pod
metadata:
  name: busybox
  namespace: default
spec:
  containers:
  - name: busybox
    image: busybox:1.32
    command:
      - sleep
      - "3600"
    imagePullPolicy: IfNotPresent
  restartPolicy: Always
  • 启动Pod
    kubectl create -f busybox.yaml
  • 进入Pod容器
    kubectl exec -it busybox -- /bin/sh

注意: 不要使用busybox:latest,最高版本的nslookup工具有bug。

相关文章:

  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2021-09-01
猜你喜欢
  • 2021-06-20
  • 2022-12-23
  • 2021-05-18
  • 2021-10-19
  • 2022-12-23
  • 2021-10-29
  • 2021-12-24
相关资源
相似解决方案