<p>I am using busybox to detect my network problem in kubernetes v1.18 pods. I created the busybox like this:</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
    name: busybox
    namespace: default
spec:
    containers:
    - name: busybox
    image: busybox:1.28
    command:
        - sleep
        - &quot;3600&quot;
    imagePullPolicy: IfNotPresent
    restartPolicy: Always
</code></pre>
<p>and login to find the kubernetes clusters  network situation:</p>
<pre><code> kubectl exec -it busybox /bin/bash
</code></pre>
<p>What surprises me is that the busybox does not contain curl. Why does the busybox package not include the curl command? I am searching the internet and find the docs do not talk about how to add curl into busybox. I tried to install curl, but found no way to do this. Is there anyway to add curl package into busybox?</p>

Dolphin
<p>The short answer, is you cannot.</p>
<h3>Why?</h3>
<p>Because busybox does not have package manager like: yum, apk, or apt-get ..</p>
<h3>Acutally you have two solutions:</h3>
<p><strong>1. Either use a modified busybox</strong></p>
<p>You can use other busybox images like <a href="https://github.com/progrium/busybox" rel="noreferrer">progrium/busybox</a> which provides <strong>opkg-install</strong> as a package manager.</p>
<pre><code>image: progrium/busybox
</code></pre>
<p>Then:</p>
<pre><code>kubectl exec -it busybox -- opkg-install curl
</code></pre>
<p><strong>2. Or if your concern to use a minimal image, you can use alpine</strong></p>
<pre><code>image: alpine:3.12
</code></pre>
<p>then:</p>
<pre><code>kubectl exec -it alpine -- apk --update add curl
</code></pre>
