您的位置 首页 k8s

k8s rc 控制器ReplicationController

ReplicationController

 

apiVersion: v1
kind: ReplicationController
metadata:
  name: baimeidashu-rc
spec:
  # 表示运行几个Pod副本数量
  replicas: 7
  # 创建Pod的模板
  template:
    metadata:
      labels:
        apps: web
    spec:
      volumes:
      - name: data
        nfs:
          server: master231
          path: /baimeidashu/data/kubernetes
      - name: etc
        configMap:
          name: nginx.conf
          items:
          - key: nginx.conf
            path: nginx.conf
      containers:
      - name: web
        image: harbor.baimeidashu.com/baimeidashu-web/nginx:1.25.1-alpine
        volumeMounts:
        - name: data
          mountPath: /usr/share/nginx/html
        - name: etc
          mountPath: /etc/nginx/nginx.conf
          subPath: nginx.conf

 

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章