<p dir="auto">Using Kubernetes 1.1.2 with Vagrant provider, running two pods:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./cluster/kubectl.sh get po
NAME               READY     STATUS    RESTARTS   AGE
mysql-pod          1/1       Running   0          21s
wildfly-rc-l2cto   1/1       Running   0          21s"><pre class="notranslate"><code class="notranslate">./cluster/kubectl.sh get po
NAME               READY     STATUS    RESTARTS   AGE
mysql-pod          1/1       Running   0          21s
wildfly-rc-l2cto   1/1       Running   0          21s
</code></pre></div>
<p dir="auto">One of the pods was deleted:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./cluster/kubectl.sh delete po wildfly-rc-l2cto
pod &quot;wildfly-rc-l2cto&quot; deleted"><pre class="notranslate"><code class="notranslate">./cluster/kubectl.sh delete po wildfly-rc-l2cto
pod "wildfly-rc-l2cto" deleted
</code></pre></div>
<p dir="auto">Watching the status of pods are shown as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./cluster/kubectl.sh get -w po
NAME               READY     STATUS        RESTARTS   AGE
mysql-pod          1/1       Running       0          1m
wildfly-rc-2o8vd   1/1       Running       0          13s
wildfly-rc-l2cto   1/1       Terminating   0          1m
NAME               READY     STATUS        RESTARTS   AGE
wildfly-rc-l2cto   0/1       Terminating   0          1m
wildfly-rc-l2cto   0/1       Terminating   0         1m
wildfly-rc-l2cto   0/1       Terminating   0         1m"><pre class="notranslate"><code class="notranslate">./cluster/kubectl.sh get -w po
NAME               READY     STATUS        RESTARTS   AGE
mysql-pod          1/1       Running       0          1m
wildfly-rc-2o8vd   1/1       Running       0          13s
wildfly-rc-l2cto   1/1       Terminating   0          1m
NAME               READY     STATUS        RESTARTS   AGE
wildfly-rc-l2cto   0/1       Terminating   0          1m
wildfly-rc-l2cto   0/1       Terminating   0         1m
wildfly-rc-l2cto   0/1       Terminating   0         1m
</code></pre></div>
<p dir="auto">Two issues:</p>
<ul dir="auto">
<li>Refreshed status shows the only for the changed pod and shows it three times</li>
<li>Even after waiting for 5 minutes, the status does not refresh to Terminated</li>
</ul>
<p dir="auto">Just checking the status as <code class="notranslate">kubectl.sh get po</code> shows that the pod has been terminated. But its confusing that with <code class="notranslate">-w</code> the status never updates to Terminated or something intuitive.</p>
<p dir="auto">A Replication Controller is started using <a href="https://github.com/arun-gupta/kubernetes-java-sample/blob/master/wildfly-rc.yaml">https://github.com/arun-gupta/kubernetes-java-sample/blob/master/wildfly-rc.yaml</a> and shows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./cluster/kubectl.sh create -f ~/workspaces/kubernetes-java-sample/wildfly-rc.yaml replicationcontrollers/wildfly-rc"><pre class="notranslate"><code class="notranslate">./cluster/kubectl.sh create -f ~/workspaces/kubernetes-java-sample/wildfly-rc.yaml replicationcontrollers/wildfly-rc
</code></pre></div>
<p dir="auto">Pods are shown correctly as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./cluster/kubectl.sh get -w po
NAME               READY     STATUS    RESTARTS   AGE
wildfly-rc-k6pk2   1/1       Running   0          47s
wildfly-rc-wez29   1/1       Running   0          47s"><pre class="notranslate"><code class="notranslate">./cluster/kubectl.sh get -w po
NAME               READY     STATUS    RESTARTS   AGE
wildfly-rc-k6pk2   1/1       Running   0          47s
wildfly-rc-wez29   1/1       Running   0          47s
</code></pre></div>
<p dir="auto">Scaled up by 1 (config file has 2) as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./cluster/kubectl.sh scale --replicas=3 rc wildfly-rc"><pre class="notranslate"><code class="notranslate">./cluster/kubectl.sh scale --replicas=3 rc wildfly-rc
</code></pre></div>
<p dir="auto">and the output is updated correctly:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NAME               READY     STATUS    RESTARTS   AGE
wildfly-rc-aqaqn   0/1       Pending   0          0s
wildfly-rc-aqaqn   0/1       Pending   0         0s
wildfly-rc-aqaqn   0/1       Pending   0         0s
wildfly-rc-aqaqn   0/1       Running   0         2s
wildfly-rc-aqaqn   1/1       Running   0         11s"><pre class="notranslate"><code class="notranslate">NAME               READY     STATUS    RESTARTS   AGE
wildfly-rc-aqaqn   0/1       Pending   0          0s
wildfly-rc-aqaqn   0/1       Pending   0         0s
wildfly-rc-aqaqn   0/1       Pending   0         0s
wildfly-rc-aqaqn   0/1       Running   0         2s
wildfly-rc-aqaqn   1/1       Running   0         11s
</code></pre></div>
<p dir="auto">Replicas are then reduced to 1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./cluster/kubectl.sh scale --replicas=1 rc wildfly-rc"><pre class="notranslate"><code class="notranslate">./cluster/kubectl.sh scale --replicas=1 rc wildfly-rc
</code></pre></div>
<p dir="auto">and the output shows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="wildfly-rc-wez29   1/1       Running   0         1m
wildfly-rc-aqaqn   1/1       Running   0         36s"><pre class="notranslate"><code class="notranslate">wildfly-rc-wez29   1/1       Running   0         1m
wildfly-rc-aqaqn   1/1       Running   0         36s
</code></pre></div>
<p dir="auto">Ctrl+C and view the list of pods running shows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./cluster/kubectl.sh get -w po
NAME               READY     STATUS    RESTARTS   AGE
wildfly-rc-k6pk2   1/1       Running   0          2m"><pre class="notranslate"><code class="notranslate">./cluster/kubectl.sh get -w po
NAME               READY     STATUS    RESTARTS   AGE
wildfly-rc-k6pk2   1/1       Running   0          2m
</code></pre></div>
<p dir="auto">Seems like the previous two pods were killed but their status was still updated to Running. This is inconsistent with the current state of Pods running.</p>