<p dir="auto">Kubernetes v1.3<br>
Kubelet v1.3</p>
<p dir="auto">Steps to reproduce:</p>
<ol dir="auto">
<li>Create a service with the named port:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apiVersion: v1
kind: Service
metadata:
  name: nginx-service
  labels:
    k8s-app: nginx-service
spec:
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
    name: myport
  selector:
    k8s-app: nginx-service"><pre class="notranslate"><code class="notranslate">apiVersion: v1
kind: Service
metadata:
  name: nginx-service
  labels:
    k8s-app: nginx-service
spec:
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
    name: myport
  selector:
    k8s-app: nginx-service
</code></pre></div>
<ol start="2" dir="auto">
<li>Change "port" from 80 to some other value, call kubectl apply. It fails:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; kubectl apply -f n                                                                                                    
proto: no encoder for TypeMeta unversioned.TypeMeta [GetProperties]                                                     
proto: tag has too few fields: &quot;-&quot;                                                                                      
proto: no coders for struct *reflect.rtype                                                                              
proto: no encoder for sec int64 [GetProperties]                                                                         
proto: no encoder for nsec int32 [GetProperties]                                                                        
proto: no encoder for loc *time.Location [GetProperties]                                                                
proto: no encoder for Time time.Time [GetProperties]                                                                    
proto: no coders for intstr.Type                                                                                        
proto: no encoder for Type intstr.Type [GetProperties]                                                                  
The Service &quot;nginx-service&quot; is invalid.                                                                                 
spec.ports[1].name: Duplicate value: &quot;myport&quot;                                                                             "><pre class="notranslate"><code class="notranslate">&gt; kubectl apply -f n                                                                                                    
proto: no encoder for TypeMeta unversioned.TypeMeta [GetProperties]                                                     
proto: tag has too few fields: "-"                                                                                      
proto: no coders for struct *reflect.rtype                                                                              
proto: no encoder for sec int64 [GetProperties]                                                                         
proto: no encoder for nsec int32 [GetProperties]                                                                        
proto: no encoder for loc *time.Location [GetProperties]                                                                
proto: no encoder for Time time.Time [GetProperties]                                                                    
proto: no coders for intstr.Type                                                                                        
proto: no encoder for Type intstr.Type [GetProperties]                                                                  
The Service "nginx-service" is invalid.                                                                                 
spec.ports[1].name: Duplicate value: "myport"                                                                             
</code></pre></div>
<p dir="auto">Workaround: rename  the port, and then apply works fine</p>
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.): no</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.): "more than its spec" "is invalid"</p>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one): BUG REPORT</p>

<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0&quot;, GitCommit:&quot;a16c0a7f71a6f93c7e0f222d961f4675cd97a46b&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T18:16:57Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0+coreos.0&quot;, GitCommit:&quot;278a1f7034bdba61cba443722647da1a8204a6fc&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T20:48:37Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:16:57Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0+coreos.0", GitCommit:"278a1f7034bdba61cba443722647da1a8204a6fc", GitTreeState:"clean", BuildDate:"2016-09-26T20:48:37Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}
</code></pre></div>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: AWS</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): CoreOS 1122.2.0</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): 4.7.0-coreos</li>
<li><strong>Install tools</strong>: bootkube</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
I've got 4 copies of pods for several deployments, though the replicas field is set to 3</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NAME                                      READY     STATUS    RESTARTS   AGE
kube-controller-manager-237587340-epcni   1/1       Running   2          10h
kube-controller-manager-237587340-gtxil   1/1       Running   21         1d
kube-controller-manager-237587340-i396r   1/1       Running   2          2h
kube-controller-manager-237587340-u553o   1/1       Running   4          6h"><pre class="notranslate"><code class="notranslate">NAME                                      READY     STATUS    RESTARTS   AGE
kube-controller-manager-237587340-epcni   1/1       Running   2          10h
kube-controller-manager-237587340-gtxil   1/1       Running   21         1d
kube-controller-manager-237587340-i396r   1/1       Running   2          2h
kube-controller-manager-237587340-u553o   1/1       Running   4          6h
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
For it to only have 3 pods</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br>
Unknown</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:<br>
Deployment, pods, and logs attached</p>
<p dir="auto"><a href="https://github.com/kubernetes/kubernetes/files/501273/logs.txt">logs.txt</a><br>
<a href="https://github.com/kubernetes/kubernetes/files/501276/pods.yaml.txt">pods.yaml.txt</a><br>
<a href="https://github.com/kubernetes/kubernetes/files/501275/deployment.yaml.txt">deployment.yaml.txt</a></p>