Bug 1327335

Summary: 'kubectl apply -f namespace.yaml' errors out
Product: Red Hat Enterprise Linux 7 Reporter: Jason Brooks <jbrooks>
Component: kubernetesAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: gouyang
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kubernetes-1.2.0-0.10.git738b760.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 14:52:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jason Brooks 2016-04-14 20:17:33 UTC
Description of problem:

The ansible scripts for bringing up a kubernetes cluster call on an upstream script that creates a 'kube-system' namespace used w/ kubernetes-addons. This script creates the namespace w/ 'kubectl apply'. With the version of kubectl that ships with RHEL, this operation fails with an error like:

# cat /etc/kubernetes/addons/namespace.yaml | /usr/bin/kubectl apply -f -
Error from server: error when retrieving current configuration of:
&{0xc2082dcbe0 0xc208101b20  kube-system STDIN 0xc208640a50 0xc208640780 }
from server for: "STDIN": namespaces "kube-system" not found

Copying over an upstream kubectl, or using the kubectl that ships with Fedora 24 currently (1.2.0-0.15.alpha6.gitf0cd09a.fc24) works fine.

Version-Release number of selected component (if applicable):

kubernetes-1.2.0-0.9.alpha1.gitb57e8bd.el7.x86_64

How reproducible:


Steps to Reproduce:
1. Set up kube cluster
2. curl -O https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/cluster/saltbase/salt/kube-addons/namespace.yaml
3. cat namespace.yaml | /usr/bin/kubectl apply -f -

Actual results:

Error from server: error when retrieving current configuration of:
&{0xc2082ccb90 0xc20811ce70  kube-system STDIN 0xc20889e780 0xc20889e4b0 }
from server for: "STDIN": namespaces "kube-system" not found

Expected results:

namespace "kube-system" created

Additional info:

See also: https://github.com/kubernetes/contrib/issues/777

Comment 3 Jan Chaloupka 2016-04-18 07:57:47 UTC
Thanks Guohua. I am not able to reproduce this with the current build too.

Comment 7 errata-xmlrpc 2016-05-12 14:52:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-1032.html