apiVersion: apps/v1
kind: Deployment
metadata:
  name: http-echo-deployment
  labels:
    app: http-echo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: http-echo
  template:
    metadata:
      labels:
        app: http-echo
    spec:
      containers:
      - name: http-echo
        image: hashicorp/http-echo
        args: ["-listen=:8080", "-text=`hello world`"]
        ports:
        - containerPort: 8080

apiVersion: v1
kind: Service
metadata:
  name: http-echo-service
spec:
  type: NodePort
  selector:
    app: http-echo
  ports:
    - name: http
      protocol: TCP
      port: 8080
      targetPort: 8080