自学内容网 自学内容网

docker busybox作为initContainers

一、上传到私有仓储

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

---
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

          ........

效果:


原文地址:https://blog.csdn.net/xiaoxionglove/article/details/143808252

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!