1111.png

github

pvc

apiVersion: apps/v1
kind: Deployment
metadata:
  name: fiora
  namespace: sre
  labels:
    app: fiora
spec:
  selector:
    matchLabels:
      app: fiora
  replicas: 1
  template:
    metadata:
      labels:
        app: fiora
    spec:
      containers:
      - name: fiora
        image: suisuijiang/fiora
        imagePullPolicy: IfNotPresent
        env:
        - name: Database
          value: mongodb://mongo-sre:27017/fiora
        ports:
        - name: chat
          containerPort: 9200
      restartPolicy: Always

svc

apiVersion: v1
kind: Service
metadata:
  labels:
    app: fiora
  name: fiora
  namespace: sre
spec:
  ports:
  - name: fiora
    port: 9200
    protocol: TCP
    targetPort: 9200
    nodePort: 30052
  selector:
    app: fiora
  type: NodePort


发表评论

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

Captcha Code