小编Kha*_*Meg的帖子

kubernetes 上的 Pgadmin4:将用户和设置保存在卷中

我想将用户帐户和其他设置保存在 pgadmin4 k8s 实例的卷中,我这样做了:

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: pgadmin
      namespace: pgadmin
    spec:
      selector:
       matchLabels:
        app: pgadmin
      replicas: 1
      template:
        metadata:
          labels:
            app: pgadmin
        spec:
          containers:
            - name: pgadmin4
              image: dpage/pgadmin4
              env:
               - name: PGADMIN_DEFAULT_EMAIL
                 value: "admin@example.com"
               - name: PGADMIN_DEFAULT_PASSWORD
                 value: "mysecpwd"
               - name: PGADMIN_PORT
                 value: "80"
              ports:
                - containerPort: 80
                  name: pgadminport
              volumeMounts:
                - mountPath: /
                  name: pgadmin-storage

          volumes:
               - name: pgadmin-storage
                 persistentVolumeClaim:
                   claimName: pgadmin-pv-claim
    ---
        kind: PersistentVolume
        apiVersion: v1
        metadata:
          name: pgadmin-pv-volume
          namespace: pgadmin
          labels:
            type: local …
Run Code Online (Sandbox Code Playgroud)

postgresql kubernetes persistent-volumes pgadmin-4

2
推荐指数
1
解决办法
3861
查看次数