title: localstack k8s deployment yaml and health check endpoint
body: <p>I've set up win 10, minikube, docker.
  I need to start localstack in my local minikube. I didn't find out k8s deployment yaml. So I take docker compose yaml that provided by them at github. And create file like below:</p>
  <pre><code># disk volume claim
  apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    creationTimestamp: null
    labels:
      com.job.service: localstack-claim0
    name: localstack-claim0
  spec:
    accessModes:
      - ReadWriteOnce
    resources:
      requests:
        storage: 100Mi
  status: {}
  ---
  # service account
  apiVersion: v1
  kind: ServiceAccount
  metadata:
    name: localstack-account
    labels:
      com.job.service: localstack-service-account
  ---
  # service
  apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: null
    labels:
      com.job.service: localstack-service
    name: localstack-service
  spec:
    type: NodePort
    externalTrafficPolicy: Cluster
    ports:
      - name: &quot;edge&quot;
        port: 4566
        targetPort: 4566
      - name: &quot;es&quot;
        port: 4571
        targetPort: 4571
      - name: &quot;ui&quot;
        port: 8080
        targetPort: 8080
    selector:
      com.job.service: localstack-service
  status:
    loadBalancer: {}
  ---
  # deployment
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    creationTimestamp: null
    labels:
      com.job.service: localstack-deployment
    name: localstack-deployment
  spec:
    replicas: 1
    selector:
      matchLabels:
        com.job.service: localstack-deployment
    strategy:
      type: Recreate
    template:
      metadata:
        creationTimestamp: null
        labels:
          com.job.service: localstack-deployment
      spec:
        containers:
          - env:
              - name: DATA_DIR
                value: ' '
              - name: DEBUG
                value: ' '
              - name: DOCKER_HOST
                value: tcp://127.0.0.1:2376
              - name: HOST_TMP_FOLDER
              - name: KINESIS_ERROR_PROBABILITY
                value: ' '
              - name: LAMBDA_EXECUTOR
                value: ' '
              - name: PORT_WEB_UI
                value: ' '
              - name: SERVICES
                value: 'sqs'
            image: localstack/localstack
            imagePullPolicy: IfNotPresent
            name: localstack-main
            ports:
              - name: edge
                containerPort: 4566
                protocol: TCP
              - name: es
                containerPort: 4571
                protocol: TCP
              - name: ui
                containerPort: 8080
                protocol: TCP
            livenessProbe:
              failureThreshold: 3
              initialDelaySeconds: 0
              periodSeconds: 10
              successThreshold: 1
              timeoutSeconds: 1
              httpGet:
                path: /health
                port: edge
            readinessProbe:
              failureThreshold: 3
              initialDelaySeconds: 0
              periodSeconds: 10
              successThreshold: 1
              timeoutSeconds: 1
              httpGet:
                path: /health
                port: edge
            resources: {}
            volumeMounts:
              - mountPath: /tmp/localstack
                name: localstack-claim0
        restartPolicy: Always
        serviceAccountName: localstack-account
        volumes:
          - name: localstack-claim0
            persistentVolumeClaim:
              claimName: localstack-claim0
  status: {}
  </code></pre>
  <p>but when I start with kubectl apply -f path_To_yaml and wait until all services is started. I try to reach health check endpoint and I receive only exception that cannot connect to host</p>
  <p>I try to use minikube tunnel , and this didn't help</p>
  <p>May be some1 know how to configure right localy? I am novice in devops</p>
  <p>try to use <code>minikube addons enable ingress</code> but didn't help me</p>
  <p><a href="https://i.stack.imgur.com/iMstp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iMstp.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/R65Eb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R65Eb.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/4nRio.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4nRio.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/jCe1A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jCe1A.png" alt="enter image description here" /></a></p>
  <p>try to manual expose and forward port with next command</p>
  <pre><code>kubectl expose pod localstack-deployment-7667b8d6bf-6mqbp --type=ClusterIP --name=localstack
  </code></pre>
  <p>and</p>
  <pre><code>kubectl port-forward po/localstack-deployment-7667b8d6bf-6mqbp 4566:4566
  </code></pre>
  <p>and connect with aws cli and awslocal cli; But the same result: could not connect</p>