Cannot apply yaml file
tracepath opened this issue · 9 comments
kube-applier doesn't actually do anything in my environment (K8S 1.6.0):
root@kube-applier-764592381-xvhtd:/# kubectl apply -f /k8s/resources/k8s-config/test/test.yaml
error: the namespace from the provided object "test" does not match the namespace "kube-system". You must pass '--namespace=test' to perform this operation.
yaml file:
---
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
name: test
namespace: test
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: Endpoints
metadata:
labels:
name: test
name: test
namespace: test
subsets:
- addresses:
- ip: 172.16.16.16
ports:
- name: http
port: 80
protocol: TCP
kind: List
metadata: {}
root@kube-applier-764592381-xvhtd:/# kubectl version
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.1", GitCommit:"b0b7a323cc5a4a2019b2e9520c21c7830b7f708e", GitTreeState:"clean", BuildDate:"2017-04-03T20:44:38Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.0", GitCommit:"fff5156092b56e6bd60fff75aad4dc9de6b6ef37", GitTreeState:"clean", BuildDate:"2017-03-28T16:24:30Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
Any ideas?
Are you using a custom kubeconfig template?
Also, the kubectl client you're using is not the same as the bundled version so you're definitely not running a stock build.
I have reproduced this. Not sure how to fix it, but i'm investigating.
@gregory-lyons was this ever working? Did you use a custom kubeconfig?
related: kubernetes/kubernetes#7789 (comment)
(sorry for accidental close)
@tracepath @pieterlange thanks for the issue, I am coming across the same problem with Kubernetes 1.5+
I am doing some more investigating but for now will update the Dockerfile and README to reflect that 1.5 and 1.6 are currently unsupported
Probably fixed in kubernetes/kubernetes#44862
Fix for 1.5 is in kubernetes/kubernetes#44901
We just have to wait for a release to be cut from the 1.5 & 1.6 branches.
so @pieterlange, can this be closed?
not my issue to close, but @tracepath never gave any more info so we can't be sure. enough time has passed to close it here though.
Updated the README in #27 to reflect supported versions. There are now more recent releases on 1.5 and 1.6 that have fixed this bug. Let me know if this behavior is still seen on one of the supported versions and I will re-open.