<p>I have trying to install go micro application, but its always getting below error,</p>
<pre><code>`   Type     Reason     Age                 From               Message
  ----     ------     ----                ----               -------
  Normal   Scheduled  &lt;unknown&gt;           default-scheduler  Successfully assigned default/greeter-7d7c644bdc-dk5q2 to minikube
  Normal   Pulling    9s (x4 over 3m10s)  kubelet, minikube  Pulling image &quot;12345.dkr.ecr.ap-south-1.amazonaws.com/micro:latest&quot;
  Normal   Pulled     9s (x4 over 61s)    kubelet, minikube  Successfully pulled image &quot;460378929709.dkr.ecr.ap-south-1.amazonaws.com/micro:latest&quot;
  Normal   Created    8s (x4 over 59s)    kubelet, minikube  Created container greeter
  Warning  Failed     8s (x4 over 56s)    kubelet, minikube  Error: failed to start container &quot;greeter&quot;: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused &quot;exec: \&quot;/greeter-srv\&quot;: stat /greeter-srv: no such file or directory&quot;: unknown
`
</code></pre>
<p>i have used this <a href="https://github.com/micro/examples/tree/master/kubernetes" rel="nofollow noreferrer">doc</a> for installation, as per this doc installed deppentency etcd and NAT , and its running fine.
Any one is created this micro application in kubernetes, i have doubt my Dockerfile it self have any issue or yaml,
can u clear me if i run any wrong , i did not get any correct doc for kubernetes installation from site.</p>
<p>I used below yaml file for kubernetes deployment</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  name: greeter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: greeter-srv
  template:
    metadata:
      labels:
        app: greeter-srv
    spec:
      containers:
        - name: greeter
          command: [
        &quot;/greeter-srv&quot;,
      ]
          image: 12345.dkr.ecr.ap-south-1.amazonaws.com/micro:latest
          imagePullPolicy: Always
          ports:
          - containerPort: 8080
            name: greeter-port
          env:
          - name: MICRO_SERVER_ADDRESS
            value: &quot;0.0.0.0:8080&quot;
          - name: MICRO_BROKER
            value: &quot;nats&quot;
          - name: MICRO_BROKER_ADDRESS
            value: &quot;nats-cluster&quot;
          - name: MICRO_REGISTRY
            value: &quot;etcd&quot;
          - name: MICRO_REGISTRY_ADDRESS
            value: &quot;etcd-cluster-client&quot;
      imagePullSecrets:
      - name: ap-south-1-ecr-registry
</code></pre>
<p>Dockerfile</p>
<pre><code>  FROM alpine:latest
RUN apk --no-cache add make git go gcc libtool musl-dev
WORKDIR /go/src/
# Configure Go
ENV GOROOT /usr/lib/go
ENV GOPATH /go
ENV PATH /go/bin:$PATH

RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin

COPY . .
COPY greeter-srv /go/src/
RUN make

RUN apk add ca-certificates &amp;&amp; \
    rm -rf /var/cache/apk/* /tmp/* &amp;&amp; \
    [ ! -e /etc/nsswitch.conf ] &amp;&amp; echo 'hosts: files dns' &gt; /etc/nsswitch.conf

ENTRYPOINT [&quot;/greeter-srv&quot;]
</code></pre>
<p>service file name greeter-srv</p>
<pre><code>import (
    &quot;github.com/micro/go-micro/v2&quot;
)
func main() {
    service := micro.NewService(
        micro.Name(&quot;greeter&quot;)
    )
    service.Init()
    service.Run()
}
</code></pre>
<p>I have build with above docker file then tag and push to aws ecr , then i used that registory in kubernetes yaml file.</p>

shufilkhan
<p><code>stat /greeter-srv: no such file or directory&quot;</code>  this is due to Dockerfile mensioned <code>WORKDIR /go/src/</code> and <code>ENTRYPOINT [&quot;/greeter-srv&quot;]</code>  this is wrong , should be used <code>ENTRYPOINT [&quot;/go/src/greeter-srv&quot;]</code></p>
