<p>I am searching for the command to <strong>print out the podname (or hostname)</strong> when I call my echoserver (<code>gcr.io/google_containers/echoserver</code>. I saw that in a video, regarding <strong>loadbalancing and ingress as a proof of concept</strong>, to show which server responds when I hit the refresh button in the browser. But I cannot remember how that worked or where that was. I searched the web but didn't find any hint.</p>

<p>At the moment my ReplicaSet looks like this:
Maybe I am missing an env variable or something like this.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
  name: echoserver
spec:
  replicas: 1
  template:
    metadata:
      name: echoserver
      labels:
        project: chapter5
        service: echoserver
    spec:
      containers:
      - name: echoserver
        image: gcr.io/google_containers/echoserver:1.4
        ports:
        - containerPort: 8080
</code></pre>

<p>I got it: I have to raise the Version!</p>

<p>With versions greater than 1.4 it works :-)</p>

<p>So the correct one is the actual version 1.10:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
  name: echoserver
spec:
  replicas: 1
  template:
    metadata:
      name: echoserver
      labels:
        project: chapter5
        service: echoserver
    spec:
      containers:
      - name: echoserver
        image: gcr.io/google_containers/echoserver:1.10
        ports:
        - containerPort: 8080
</code></pre>
