Kubernetes k8s吊舱的一个副本使用的内存是另一个的两倍

Kubernetes k8s吊舱的一个副本使用的内存是另一个的两倍,kubernetes,google-kubernetes-engine,Kubernetes,Google Kubernetes Engine,我有以下kubernetes deployment.yml用于运行比特币 apiVersion: apps/v1 kind: StatefulSet metadata: name: bitcoin namespace: prod spec: serviceName: bitcoinrpc-service replicas: 2 selector: matchLabels: app: bitcoin-node template: metadata

我有以下kubernetes deployment.yml用于运行比特币

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: bitcoin
  namespace: prod
spec:
  serviceName: bitcoinrpc-service
  replicas: 2
  selector:
    matchLabels:
      app: bitcoin-node
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "false" #because it needs to discover and connect to other peers
        sidecar.istio.io/proxyImage: docker.io/istio/proxyv2:0.8.0
      labels:
        app: bitcoin-node  
    spec:
      containers:
      - name: bitcoin-node-mainnet
        image: <my image>
        imagePullPolicy: Always
        ports:
        - containerPort: 8332 
        - containerPort: 38832
        env:
        - name: RPC_USER
          valueFrom:
            secretKeyRef:
              name: secrets
              key: bitcoind_rpc_username
        - name: RPC_PASSWORD
          valueFrom:
            secretKeyRef:
              name: secrets
              key: bitcoind_rpc_password
        - name: RPC_ALLOW_IP
          value: "0.0.0.0/0"
        - name: RPC_PORT
          value: "8332"
        - name: PORT
          value: "8333"  
        - name: RPC_THREADS
          value: "64"
        - name: RPC_TIMEOUT
          value: "300"
        - name: SERVER
          value: "1"  
        - name: TX_INDEX
          value: "1"
        - name: ADDR_INDEX
          value: "1"
        - name: MAX_MEMPOOL
          value: "10000"
        - name: DBCACHE
          value: "4096"
        - name: MEMPOOL_EXPIRY
          value: "336"
        - name: ZMQPUBHASHBLOCK
          value: "tcp://*:38832"
        - name: ZMQPUBHASHTX
          value: "tcp://*:38832"  
        - name: ZMQPUBRAWTX
          value: "tcp://*:38832"
        volumeMounts:
        - name: bitcoin-chaindata
          mountPath: /root/.bitcoin
        resources:
          requests:
            memory: "8Gi" # 8 GB
            cpu: "3000m"  # 3 CPUs
          limits:
            memory: "16Gi" # 16 GB
            cpu: "3000" #  3 CPUs  
        livenessProbe:
          httpGet:
              path: /rest/chaininfo.json
              port: 8332
          initialDelaySeconds: 120 #wait this period after staring fist time
          periodSeconds: 240  # polling interval
          timeoutSeconds: 60    # wish to receive response within this time period
        readinessProbe: 
          httpGet:
              path: /rest/chaininfo.json
              port: 8332
          initialDelaySeconds: 120 #wait this period after staring fist time
          periodSeconds: 240    # polling interval
          timeoutSeconds: 60  
        command: ["/bin/ash"]
        args: ["-c","/app/bitcoin/bin/bitcoind  -printtoconsole \
                  -pid=/root/.bitcoin/bitcoind.pid \
                  -rest \
                  -port=${PORT} \
                  -daemon=0 \
                  -rpcuser=${RPC_USER}  \
                  -rpcpassword=${RPC_PASSWORD} \
                  -rpcport=${RPC_PORT} \
                  -rpcallowip=${RPC_ALLOW_IP} \
                  -rpcthreads=${RPC_THREADS} \
                  -server=${SERVER} \
                  -txindex=${TX_INDEX} \
                  -maxmempool=${MAX_MEMPOOL} \
                  -dbcache=${DBCACHE} \
                  -mempoolexpiry=${MEMPOOL_EXPIRY} \
                  -rpcworkqueue=500 \
                  -zmqpubhashblock=${ZMQPUBHASHBLOCK} \
                  -zmqpubhashtx=${ZMQPUBHASHTX} \
                  -zmqpubrawtx=${ZMQPUBRAWTX} \
                  -addresstype=legacy"]

                  # -rpctimeout=${RPC_TIMEOUT} \
                  # -addrindex=${ADDR_INDEX} \

  volumeClaimTemplates:
  - metadata:
      name: bitcoin-chaindata
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: fast
      resources:
        requests:
          storage: 500Gi   
因为我将最大CPU使用限制为16GB,所以我希望两个POD都使用小于16GB的CPU。 但是,我可以在stackdriver上看到,其中一个POD使用约12GB,而另一个则高达32GB。 在什么情况下会发生这种情况


我有一个2 x 35GB的集群。

我们将能够在容器级别控制资源,通过它我们可以在pod级别控制pod cpu限制是其中所有容器限制的总和

我认为,我们无法控制整个复制