51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

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
赞(6)
未经允许不得转载:工具盒子 » k8s rc 控制器ReplicationController