apiVersion: v1
kind: Namespace
metadata:
  name: demo
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: http-echo
  namespace: demo
spec:
  replicas: 2
  selector:
    matchLabels:
      app: http-echo
  template:
    metadata:
      labels:
        app: http-echo
    spec:
      containers:
      - image: registry.cn-shenzhen.aliyuncs.com/shuhui/http-echo:1.0
        imagePullPolicy: IfNotPresent
        name: echo1
        ports:
        - containerPort: 5678
        args:
        - "-text=Hello echo1"
---
apiVersion: v1
kind: Service
metadata:
  name: http-echo
  namespace: demo
spec:
  ports:
    - port: 80
      targetPort: 5678
      protocol: TCP
  type: ClusterIP
  selector:
    app: http-echo
