Merge pull request #31989 from guettli/31930__fix_busybox_image_1.28

fix busybox image to version 1.28
This commit is contained in:
Kubernetes Prow Robot
2022-03-25 15:45:59 -07:00
committed by GitHub
30 changed files with 49 additions and 49 deletions
@@ -72,7 +72,7 @@ spec:
runtimeClassName: kata-fc runtimeClassName: kata-fc
containers: containers:
- name: busybox-ctr - name: busybox-ctr
image: busybox image: busybox:1.28
stdin: true stdin: true
tty: true tty: true
resources: resources:
@@ -107,7 +107,7 @@ metadata:
spec: spec:
containers: containers:
- name: my-frontend - name: my-frontend
image: busybox image: busybox:1.28
volumeMounts: volumeMounts:
- mountPath: "/data" - mountPath: "/data"
name: my-csi-inline-vol name: my-csi-inline-vol
@@ -158,7 +158,7 @@ metadata:
spec: spec:
containers: containers:
- name: my-frontend - name: my-frontend
image: busybox image: busybox:1.28
volumeMounts: volumeMounts:
- mountPath: "/scratch" - mountPath: "/scratch"
name: scratch-volume name: scratch-volume
+2 -2
View File
@@ -251,7 +251,7 @@ metadata:
spec: spec:
containers: containers:
- name: test - name: test
image: busybox image: busybox:1.28
volumeMounts: volumeMounts:
- name: config-vol - name: config-vol
mountPath: /etc/config mountPath: /etc/config
@@ -1128,7 +1128,7 @@ spec:
fieldRef: fieldRef:
apiVersion: v1 apiVersion: v1
fieldPath: metadata.name fieldPath: metadata.name
image: busybox image: busybox:1.28
command: [ "sh", "-c", "while [ true ]; do echo 'Hello'; sleep 10; done | tee -a /logs/hello.txt" ] command: [ "sh", "-c", "while [ true ]; do echo 'Hello'; sleep 10; done | tee -a /logs/hello.txt" ]
volumeMounts: volumeMounts:
- name: workdir1 - name: workdir1
@@ -180,7 +180,7 @@ spec:
spec: spec:
containers: containers:
- name: hello - name: hello
image: busybox image: busybox:1.28
command: ['sh', '-c', 'echo "Hello, Kubernetes!" && sleep 3600'] command: ['sh', '-c', 'echo "Hello, Kubernetes!" && sleep 3600']
restartPolicy: OnFailure restartPolicy: OnFailure
# The pod template ends here # The pod template ends here
@@ -102,10 +102,10 @@ kubectl apply -f https://git.io/vPieo # create resource(s) from url
kubectl create deployment nginx --image=nginx # start a single instance of nginx kubectl create deployment nginx --image=nginx # start a single instance of nginx
# create a Job which prints "Hello World" # create a Job which prints "Hello World"
kubectl create job hello --image=busybox -- echo "Hello World" kubectl create job hello --image=busybox:1.28 -- echo "Hello World"
# create a CronJob that prints "Hello World" every minute # create a CronJob that prints "Hello World" every minute
kubectl create cronjob hello --image=busybox --schedule="*/1 * * * *" -- echo "Hello World" kubectl create cronjob hello --image=busybox:1.28 --schedule="*/1 * * * *" -- echo "Hello World"
kubectl explain pods # get the documentation for pod manifests kubectl explain pods # get the documentation for pod manifests
@@ -118,7 +118,7 @@ metadata:
spec: spec:
containers: containers:
- name: busybox - name: busybox
image: busybox image: busybox:1.28
args: args:
- sleep - sleep
- "1000000" - "1000000"
@@ -130,7 +130,7 @@ metadata:
spec: spec:
containers: containers:
- name: busybox - name: busybox
image: busybox image: busybox:1.28
args: args:
- sleep - sleep
- "1000" - "1000"
@@ -320,7 +320,7 @@ kubectl logs my-pod -c my-container --previous # dump pod container logs (s
kubectl logs -f my-pod # stream pod logs (stdout) kubectl logs -f my-pod # stream pod logs (stdout)
kubectl logs -f my-pod -c my-container # stream pod container logs (stdout, multi-container case) kubectl logs -f my-pod -c my-container # stream pod container logs (stdout, multi-container case)
kubectl logs -f -l name=myLabel --all-containers # stream all pods logs with label name=myLabel (stdout) kubectl logs -f -l name=myLabel --all-containers # stream all pods logs with label name=myLabel (stdout)
kubectl run -i --tty busybox --image=busybox -- sh # Run pod as interactive shell kubectl run -i --tty busybox --image=busybox:1.28 -- sh # Run pod as interactive shell
kubectl run nginx --image=nginx -n mynamespace # Start a single instance of nginx pod in the namespace of mynamespace kubectl run nginx --image=nginx -n mynamespace # Start a single instance of nginx pod in the namespace of mynamespace
kubectl run nginx --image=nginx # Run pod nginx and write its spec into a file called pod.yaml kubectl run nginx --image=nginx # Run pod nginx and write its spec into a file called pod.yaml
--dry-run=client -o yaml > pod.yaml --dry-run=client -o yaml > pod.yaml
@@ -68,7 +68,7 @@ pod/nginx-701339712-e0qfq 1/1 Running 0 35s
You should be able to access the new `nginx` service from other Pods. To access the `nginx` Service from another Pod in the `default` namespace, start a busybox container: You should be able to access the new `nginx` service from other Pods. To access the `nginx` Service from another Pod in the `default` namespace, start a busybox container:
```console ```console
kubectl run busybox --rm -ti --image=busybox -- /bin/sh kubectl run busybox --rm -ti --image=busybox:1.28 -- /bin/sh
``` ```
In your shell, run the following command: In your shell, run the following command:
@@ -111,7 +111,7 @@ networkpolicy.networking.k8s.io/access-nginx created
When you attempt to access the `nginx` Service from a Pod without the correct labels, the request times out: When you attempt to access the `nginx` Service from a Pod without the correct labels, the request times out:
```console ```console
kubectl run busybox --rm -ti --image=busybox -- /bin/sh kubectl run busybox --rm -ti --image=busybox:1.28 -- /bin/sh
``` ```
In your shell, run the command: In your shell, run the command:
@@ -130,7 +130,7 @@ wget: download timed out
You can create a Pod with the correct labels to see that the request is allowed: You can create a Pod with the correct labels to see that the request is allowed:
```console ```console
kubectl run busybox --rm -ti --labels="access=true" --image=busybox -- /bin/sh kubectl run busybox --rm -ti --labels="access=true" --image=busybox:1.28 -- /bin/sh
``` ```
In your shell, run the command: In your shell, run the command:
@@ -110,7 +110,7 @@ specify the `-i`/`--interactive` argument, `kubectl` will automatically attach
to the console of the Ephemeral Container. to the console of the Ephemeral Container.
```shell ```shell
kubectl debug -it ephemeral-demo --image=busybox --target=ephemeral-demo kubectl debug -it ephemeral-demo --image=busybox:1.28 --target=ephemeral-demo
``` ```
``` ```
@@ -182,7 +182,7 @@ but you need debugging utilities not included in `busybox`. You can simulate
this scenario using `kubectl run`: this scenario using `kubectl run`:
```shell ```shell
kubectl run myapp --image=busybox --restart=Never -- sleep 1d kubectl run myapp --image=busybox:1.28 --restart=Never -- sleep 1d
``` ```
Run this command to create a copy of `myapp` named `myapp-debug` that adds a Run this command to create a copy of `myapp` named `myapp-debug` that adds a
@@ -225,7 +225,7 @@ To simulate a crashing application, use `kubectl run` to create a container
that immediately exits: that immediately exits:
``` ```
kubectl run --image=busybox myapp -- false kubectl run --image=busybox:1.28 myapp -- false
``` ```
You can see using `kubectl describe pod myapp` that this container is crashing: You can see using `kubectl describe pod myapp` that this container is crashing:
@@ -283,7 +283,7 @@ additional utilities.
As an example, create a Pod using `kubectl run`: As an example, create a Pod using `kubectl run`:
``` ```
kubectl run myapp --image=busybox --restart=Never -- sleep 1d kubectl run myapp --image=busybox:1.28 --restart=Never -- sleep 1d
``` ```
Now use `kubectl debug` to make a copy and change its container image Now use `kubectl debug` to make a copy and change its container image
@@ -201,7 +201,7 @@ spec:
spec: spec:
containers: containers:
- name: c - name: c
image: busybox image: busybox:1.28
command: ["sh", "-c", "echo Processing URL {{ url }} && sleep 5"] command: ["sh", "-c", "echo Processing URL {{ url }} && sleep 5"]
restartPolicy: Never restartPolicy: Never
{% endfor %} {% endfor %}
@@ -152,7 +152,7 @@ runs in an infinite loop, sending queries to the php-apache service.
```shell ```shell
# Run this in a separate terminal # Run this in a separate terminal
# so that the load generation continues and you can carry on with the rest of the steps # so that the load generation continues and you can carry on with the rest of the steps
kubectl run -i --tty load-generator --rm --image=busybox --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://php-apache; done" kubectl run -i --tty load-generator --rm --image=busybox:1.28 --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://php-apache; done"
``` ```
Now run: Now run:
@@ -264,7 +264,7 @@ metadata:
spec: spec:
containers: containers:
- name: hello - name: hello
image: busybox image: busybox:1.28
command: [ "sh", "-c", "echo 'Hello AppArmor!' && sleep 1h" ] command: [ "sh", "-c", "echo 'Hello AppArmor!' && sleep 1h" ]
EOF EOF
pod/hello-apparmor-2 created pod/hello-apparmor-2 created
@@ -119,7 +119,7 @@ clusterip ClusterIP 10.0.170.92 <none> 80/TCP 51s
And hitting the `ClusterIP` from a pod in the same cluster: And hitting the `ClusterIP` from a pod in the same cluster:
```shell ```shell
kubectl run busybox -it --image=busybox --restart=Never --rm kubectl run busybox -it --image=busybox:1.28 --restart=Never --rm
``` ```
The output is similar to this: The output is similar to this:
``` ```
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: count - name: count
image: busybox image: busybox:1.28
args: args:
- /bin/sh - /bin/sh
- -c - -c
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: count - name: count
image: busybox image: busybox:1.28
args: args:
- /bin/sh - /bin/sh
- -c - -c
@@ -22,13 +22,13 @@ spec:
- name: varlog - name: varlog
mountPath: /var/log mountPath: /var/log
- name: count-log-1 - name: count-log-1
image: busybox image: busybox:1.28
args: [/bin/sh, -c, 'tail -n+1 -f /var/log/1.log'] args: [/bin/sh, -c, 'tail -n+1 -f /var/log/1.log']
volumeMounts: volumeMounts:
- name: varlog - name: varlog
mountPath: /var/log mountPath: /var/log
- name: count-log-2 - name: count-log-2
image: busybox image: busybox:1.28
args: [/bin/sh, -c, 'tail -n+1 -f /var/log/2.log'] args: [/bin/sh, -c, 'tail -n+1 -f /var/log/2.log']
volumeMounts: volumeMounts:
- name: varlog - name: varlog
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: count - name: count
image: busybox image: busybox:1.28
args: args:
- /bin/sh - /bin/sh
- -c - -c
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: busybox-cnt01 - name: busybox-cnt01
image: busybox image: busybox:1.28
command: ["/bin/sh"] command: ["/bin/sh"]
args: ["-c", "while true; do echo hello from cnt01; sleep 10;done"] args: ["-c", "while true; do echo hello from cnt01; sleep 10;done"]
resources: resources:
@@ -16,7 +16,7 @@ spec:
memory: "200Mi" memory: "200Mi"
cpu: "500m" cpu: "500m"
- name: busybox-cnt02 - name: busybox-cnt02
image: busybox image: busybox:1.28
command: ["/bin/sh"] command: ["/bin/sh"]
args: ["-c", "while true; do echo hello from cnt02; sleep 10;done"] args: ["-c", "while true; do echo hello from cnt02; sleep 10;done"]
resources: resources:
@@ -24,7 +24,7 @@ spec:
memory: "100Mi" memory: "100Mi"
cpu: "100m" cpu: "100m"
- name: busybox-cnt03 - name: busybox-cnt03
image: busybox image: busybox:1.28
command: ["/bin/sh"] command: ["/bin/sh"]
args: ["-c", "while true; do echo hello from cnt03; sleep 10;done"] args: ["-c", "while true; do echo hello from cnt03; sleep 10;done"]
resources: resources:
@@ -32,6 +32,6 @@ spec:
memory: "200Mi" memory: "200Mi"
cpu: "500m" cpu: "500m"
- name: busybox-cnt04 - name: busybox-cnt04
image: busybox image: busybox:1.28
command: ["/bin/sh"] command: ["/bin/sh"]
args: ["-c", "while true; do echo hello from cnt04; sleep 10;done"] args: ["-c", "while true; do echo hello from cnt04; sleep 10;done"]
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: busybox-cnt01 - name: busybox-cnt01
image: busybox image: busybox:1.28
command: ["/bin/sh"] command: ["/bin/sh"]
args: ["-c", "while true; do echo hello from cnt01; sleep 10;done"] args: ["-c", "while true; do echo hello from cnt01; sleep 10;done"]
resources: resources:
@@ -16,7 +16,7 @@ spec:
memory: "200Mi" memory: "200Mi"
cpu: "500m" cpu: "500m"
- name: busybox-cnt02 - name: busybox-cnt02
image: busybox image: busybox:1.28
command: ["/bin/sh"] command: ["/bin/sh"]
args: ["-c", "while true; do echo hello from cnt02; sleep 10;done"] args: ["-c", "while true; do echo hello from cnt02; sleep 10;done"]
resources: resources:
@@ -24,7 +24,7 @@ spec:
memory: "100Mi" memory: "100Mi"
cpu: "100m" cpu: "100m"
- name: busybox-cnt03 - name: busybox-cnt03
image: busybox image: busybox:1.28
command: ["/bin/sh"] command: ["/bin/sh"]
args: ["-c", "while true; do echo hello from cnt03; sleep 10;done"] args: ["-c", "while true; do echo hello from cnt03; sleep 10;done"]
resources: resources:
@@ -32,6 +32,6 @@ spec:
memory: "200Mi" memory: "200Mi"
cpu: "500m" cpu: "500m"
- name: busybox-cnt04 - name: busybox-cnt04
image: busybox image: busybox:1.28
command: ["/bin/sh"] command: ["/bin/sh"]
args: ["-c", "while true; do echo hello from cnt04; sleep 10;done"] args: ["-c", "while true; do echo hello from cnt04; sleep 10;done"]
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: busybox-cnt01 - name: busybox-cnt01
image: busybox image: busybox:1.28
resources: resources:
limits: limits:
memory: "300Mi" memory: "300Mi"
@@ -10,7 +10,7 @@ spec:
spec: spec:
containers: containers:
- name: hello - name: hello
image: busybox image: busybox:1.28
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
command: command:
- /bin/sh - /bin/sh
@@ -13,6 +13,6 @@ spec:
spec: spec:
containers: containers:
- name: c - name: c
image: busybox image: busybox:1.28
command: ["sh", "-c", "echo Processing item $ITEM && sleep 5"] command: ["sh", "-c", "echo Processing item $ITEM && sleep 5"]
restartPolicy: Never restartPolicy: Never
+1 -1
View File
@@ -5,6 +5,6 @@ metadata:
spec: spec:
containers: containers:
- name: count - name: count
image: busybox image: busybox:1.28
args: [/bin/sh, -c, args: [/bin/sh, -c,
'i=0; while true; do echo "$i: $(date)"; i=$((i+1)); sleep 1; done'] 'i=0; while true; do echo "$i: $(date)"; i=$((i+1)); sleep 1; done']
@@ -14,7 +14,7 @@ spec:
# These containers are run during pod initialization # These containers are run during pod initialization
initContainers: initContainers:
- name: install - name: install
image: busybox image: busybox:1.28
command: command:
- wget - wget
- "-O" - "-O"
@@ -10,7 +10,7 @@ spec:
command: command:
- sh - sh
- -c - -c
image: busybox image: busybox:1.28
env: env:
- name: SERVICE_PORT - name: SERVICE_PORT
value: "80" value: "80"
@@ -9,5 +9,5 @@ metadata:
spec: spec:
containers: containers:
- name: hello - name: hello
image: busybox image: busybox:1.28
command: [ "sh", "-c", "echo 'Hello AppArmor!' && sleep 1h" ] command: [ "sh", "-c", "echo 'Hello AppArmor!' && sleep 1h" ]
@@ -12,7 +12,7 @@ spec:
emptyDir: {} emptyDir: {}
containers: containers:
- name: sec-ctx-demo - name: sec-ctx-demo
image: busybox image: busybox:1.28
command: [ "sh", "-c", "sleep 1h" ] command: [ "sh", "-c", "sleep 1h" ]
volumeMounts: volumeMounts:
- name: sec-ctx-vol - name: sec-ctx-vol
@@ -8,7 +8,7 @@ spec:
- name: nginx - name: nginx
image: nginx image: nginx
- name: shell - name: shell
image: busybox image: busybox:1.28
securityContext: securityContext:
capabilities: capabilities:
add: add:
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: container-test - name: container-test
image: busybox image: busybox:1.28
volumeMounts: volumeMounts:
- name: all-in-one - name: all-in-one
mountPath: "/projected-volume" mountPath: "/projected-volume"
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: container-test - name: container-test
image: busybox image: busybox:1.28
volumeMounts: volumeMounts:
- name: all-in-one - name: all-in-one
mountPath: "/projected-volume" mountPath: "/projected-volume"
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: container-test - name: container-test
image: busybox image: busybox:1.28
volumeMounts: volumeMounts:
- name: token-vol - name: token-vol
mountPath: "/service-account" mountPath: "/service-account"
@@ -5,7 +5,7 @@ metadata:
spec: spec:
containers: containers:
- name: test-projected-volume - name: test-projected-volume
image: busybox image: busybox:1.28
args: args:
- sleep - sleep
- "86400" - "86400"
@@ -15,7 +15,7 @@ spec:
- "bar.remote" - "bar.remote"
containers: containers:
- name: cat-hosts - name: cat-hosts
image: busybox image: busybox:1.28
command: command:
- cat - cat
args: args: