Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_from_file YAML throws an exception: Error creating resource: the server could not find the requested resource #6

Open
guillelb opened this issue Nov 2, 2017 · 0 comments

Comments

@guillelb
Copy link

guillelb commented Nov 2, 2017

Hello,

I am working with:

  • K8S: v1.7.8
  • PERL: v5.22.1

With a K8S cluster working, I launch the following PERL:

my $kube = Net::Kubernetes->new(url=>'http://127.0.0.1:8080');
my $resource = $kube->create_from_file('/etc/kubernetes/deployments/skydns-dply.yaml');

And I obtain this Exception stack:

Error creating resource: the server could not find the requested resource

Trace begun at /usr/local/share/perl/5.22.1/Net/Kubernetes/Role/ResourceCreator.pm line 68
Net::Kubernetes::Role::ResourceCreator::create('Net::Kubernetes::Namespace=HASH(0x31e7158)', 'HASH(0x32ef728)') called at /usr/local/share/perl/5.22.1/Net/Kubernetes/Role/ResourceCreator.pm line 37
Net::Kubernetes::Role::ResourceCreator::create_from_file('Net::Kubernetes::Namespace=HASH(0x31e7158)', '/etc/kubernetes/deployments/skydns-dply.yaml') called at inline delegation in Net::Kubernetes for default_namespace->create_from_file (attribute declared in /usr/local/share/perl/5.22.1/Net/Kubernetes.pm at line 19) line 18
Net::Kubernetes::create_from_file('Net::Kubernetes=HASH(0x3220a80)', '/etc/kubernetes/deployments/skydns-dply.yaml') called at setup.pl line 1044
eval {...} at setup.pl line 1043

On the other hand, if I deploy the same YAML from KUBECTL, everything works fine:

# kubectl create -f /etc/kubernetes/deployments/skydns-dply.yaml
deployment "kube-dns" created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant