Skip to main content

busybox

ben.wangzLess than 1 minute

busybox

prepare

  1. k8s is ready

installation

  1. prepare busybox.yaml
    • fedora
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: fedora
        labels:
          app: fedora
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: fedora
        template:
          metadata:
            labels:
              app: fedora
          spec:
            containers:
            - name: fedora
              image: docker.io/library/fedora:38
              command:
              - tail
              - -f
              - /etc/hosts
              imagePullPolicy: IfNotPresent
      
      
  2. apply to k8s
    • kubectl apply -f busybox.yaml
      
  3. exec
    • fedora
      kubectl exec -it deployment/busybox -- sh
      
  4. use wget to test http service
    • wget -q -O - https://minio-console.storage:9001