码迷,mamicode.com
首页 > 其他好文 > 详细

k8s资源sidecar

时间:2021-07-05 18:17:37      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:table   not   path   server   policy   主机名   lang   ace   name   

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                                             

k8s资源sidecar

标签:table   not   path   server   policy   主机名   lang   ace   name   

原文地址:https://www.cnblogs.com/wangend/p/14966356.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!