kubernetes部署postwoman

  sre

Deployment postwoman

apiVersion: apps/v1
kind: Deployment
metadata:
  name: postwoman
  namespace: test
  labels:
    app: postwoman
spec:
  replicas: 1
  selector:
    matchLabels:
      app: postwoman
  template:
    metadata:
      name: postwoman
      labels:
        app: postwoman
    spec:
      containers:
        - name: postwoman
          image: liyasthomas/postwoman:latest
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 3000
      restartPolicy: Always

svc postwoman

apiVersion: v1
kind: Service
metadata:
  name: postwoman
  namespace: test
  labels:
    app: postwoman
spec:
  type: NodePort
  selector:
    app: postwoman
  ports:
    - port: 3000
      name: http
      targetPort: 3000
      nodePort: 30041

LEAVE A COMMENT

Captcha Code