一、上传到私有仓储
docker pull busybox:1.33.1
docker tag busybox:1.33.1 192.168.31.185/public/busybox:1.33.1
docker push 192.168.31.185/public/busybox:1.33.1
javascript
---
apiVersion: apps/v1
kind: Deployment
spec:
containers:
- env:
- name: ASPNETCORE_ENVIRONMENT
value: Production
........
initContainers:
- command:
- sh
- '-c'
- echo 2000 > /proc/sys/net/core/somaxconn
image: 'harbor.net.com/public/busybox:1.33.1'
imagePullPolicy: Always
name: busyboxhost
resources: {}
securityContext:
privileged: true
terminationMessagePath: /temp/termination-log
terminationMessagePolicy: File
........
效果: