Kubernetes部署易读 yireader读书网站

  sre


后端
前端
镜像

Deployment yireader

apiVersion: apps/v1
kind: Deployment
metadata:
  name: yireader-test
  namespace: sre
  labels:
    app: yireader-test
spec:
  selector:
    matchLabels:
      app: yireader-test
  template:
    metadata:
      labels:
        app: yireader-test
    spec:
      containers:
      - name: yireader
        image: uhziel/yireader
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 3001
          name: http
        env:
        - name: NODE_ENV
          value: production

svc yireader

apiVersion: v1
kind: Service
metadata:
  name: yireader-test
  namespace: sre
spec:
  type: NodePort
  ports:
  - name: mysqlport
    protocol: TCP
    port: 3001
    targetPort: http
    nodePort: 30006
  selector:
    app: yireader-test

LEAVE A COMMENT

Captcha Code