E4B0B3BC893E1428EAE8775591827C85.jpg

pvc

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: omnicore-data-pvc
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: "500Gi"
  volumeName: 
  storageClassName: nfs

deployment

apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: btc-omnicore
  labels:
    name: btc
spec:
  template:
    metadata:
      name: btc
      labels:
        name: btc
    spec:
      containers:
      - name: btc
        image: mpugach/omnicored:v0.3.0-alpine
        imagePullPolicy: IfNotPresent
        env:
        - name: RABBITMQ_DEFAULT_USER
          value: "admin"
        - name: RABBITMQ_DEFAULT_PASS
          value: "1qaz@WSX"
        ports:
        - name: rpc
          containerPort: 8332
        - name: http
          containerPort: 8333
        args: ["-server","-txindex","-rpcuser=admin","-rpcpassword=1qaz@WSX","-rpcallowip=0.0.0.0/0","-printtoconsole"]
        volumeMounts:
          - name: omnicore-data
            mountPath: /omnicore/data
      volumes:
        - name: omnicore-data
          persistentVolumeClaim:
            claimName: omnicore-data-pvc

service

apiVersion: v1
kind: Service
metadata:
  name: btc-omnicore
  labels:
    name: btc-omnicore
spec:
  type: NodePort
  ports:
    - name: tcp
      port: 8332
      nodePort: 30009
      targetPort: 8332
  selector:
    name: btc-omnicore

test:

curl -d "username=admin&password=1qaz@WSX" "http://127.0.0.1:30009/omni_getinfo"

发表评论

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

Captcha Code