333.jpg

pvc

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: lotus-textile-data
  namespace: fil
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: "1000Gi"
  volumeName: 
  storageClassName: nas

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    k8s.kuboard.cn/name: lotus-textile
  name: lotus-textile
  namespace: fil
spec:
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s.kuboard.cn/name: lotus-textile
  template:
    metadata:
      labels:
        k8s.kuboard.cn/name: lotus-textile
    spec:
      containers:
        - env:
            - name: LOTUS_API_LISTENADDRESS
              value: /ip4/0.0.0.0/tcp/1234/http
            - name: HOME_PATH
              value: /data
          image: 'textile/lotus:e9989d0e4'
          imagePullPolicy: IfNotPresent
          name: lotus-textile
          ports:
            - containerPort: 1234
              name: api
              protocol: TCP
          volumeMounts:
            - mountPath: /data
              name: lotus-textile-data
      restartPolicy: Always
      volumes:
        - name: lotus-textile-data
          persistentVolumeClaim:
            claimName: lotus-textile-data

svc

apiVersion: v1
kind: Service
metadata:
  labels:
    k8s.kuboard.cn/name: lotus-textile
  name: lotus-textile
  namespace: fil
spec:
  ports:
    - name: api
      port: 1234
      protocol: TCP
      targetPort: 1234
  selector:
    k8s.kuboard.cn/name: lotus-textile
  type: ClusterIP

发表评论

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

Captcha Code