cm

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: example-configmap
data:
  a: "1"
  b: "2"

StatefulSet

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: example
spec:
  selector:
    matchLabels:
      app: example
  serviceName: example
  template:
    metadata:
      labels:
        app: example
    spec:
      containers:
        - name: example
          image: nginx:stable-alpine
          volumeMounts:
            - mountPath: /config
              name: example-config
      volumes:
        - name: example-config
          configMap:
            name: example-configmap

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code