k8s资源sidecar

时间:2021-07-05 18:17:37   收藏:0   阅读:0

sidecar 模式

共享 不共享
network ipc
utc pid
mount user
apiVersion: v1
kind: Pod
metadata:
  name: test-sidecar
  namespace: default
spec:
  hostname: test-sidecar    # 主机名
  volumes:                  # 存储
  - name: test-volume    
    hostPath:
      path: /tmp
  containers:
    - name: test1
      image: python
      imagePullPolicy: IfNotPresent
      args:
      - "python"
      - "-m"
      - "http.server"
      - "8111"
      ports:
      - containerPort: 8111
      volumeMounts:
        - name: test-volume
          mountPath: /tmp/123
    - name: test2
      image: python
      imagePullPolicy: IfNotPresent
      args:
      - "python"
      - "-m"
      - "http.server"
      - "8112"
      ports:
      - containerPort: 8112
      volumeMounts:
        - name: test-volume
          mountPath: /tmp/123                                             
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!