Closed KrisBuytaert closed 7 years ago
I've just tried this with kubeclient 2.1.0 and found it worked as expected. So I think this is a problem with your config. Sorry it took a while for me to get to.
Do other kubectl
commands work as expected? ie. can you list the nodes in your cluster with kubectl get nodes
?
kubectl get nodes etc works for sure ... but I`ll have a deeper look after next weeks' conference chaos :)
@KrisBuytaert I've not been able to recreate this so I'm going to close unfortunately, unless you have had time to recreate?
Seems like I can't even get the information from the API ..
Error: Could not run: Puppet detected a problem with the information returned from the service when accessing kubernetes_pod. The specific error was: Unknown context
/tmp/vagrant-puppet/modules-89b46079a69868a23ebae582c0c9866d/kube_functions/lib/kubeclient/config.rb:81:in'
fetch_context' /tmp/vagrant-puppet/modules-89b46079a69868a23ebae582c0c9866d/kube_functions/lib/kubeclient/config.rb:35:in
context' /tmp/vagrant-puppet/modules-89b46079a69868a23ebae582c0c9866d/kube_functions/lib/puppet_x/puppetlabs/kubernetes/provider.rb:37:inclient' /tmp/vagrant-puppet/modules-89b46079a69868a23ebae582c0c9866d/kube_functions/lib/puppet_x/puppetlabs/kubernetes/provider.rb:48:in
list_instances_of' /tmp/vagrant-puppet/modules-89b46079a69868a23ebae582c0c9866d/kube_functions/lib/puppet/provider/kubernetes_pod/swagger.rb:57:inlist_instances' /tmp/vagrant-puppet/modules-89b46079a69868a23ebae582c0c9866d/kube_functions/lib/puppet_x/puppetlabs/swagger/provider.rb:17:in
instances' /tmp/vagrant-puppet/modules-89b46079a69868a23ebae582c0c9866d/kube_functions/lib/puppet_x/puppetlabs/swagger/provider.rb:30:inprefetch' /usr/share/ruby/vendor_ruby/puppet/transaction.rb:307:in
prefetch' /usr/share/ruby/vendor_ruby/puppet/transaction.rb:197:inprefetch_if_necessary' /usr/share/ruby/vendor_ruby/puppet/transaction.rb:96:in
block in evaluate' /usr/share/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:116:incall' /usr/share/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:116:in
traverse' /usr/share/ruby/vendor_ruby/puppet/transaction.rb:138:inevaluate' /usr/share/ruby/vendor_ruby/puppet/resource/catalog.rb:169:in
block in apply' /usr/share/ruby/vendor_ruby/puppet/util/log.rb:149:inwith_destination' /usr/share/ruby/vendor_ruby/puppet/transaction/report.rb:112:in
as_logging_destination' /usr/share/ruby/vendor_ruby/puppet/resource/catalog.rb:168:inapply' /usr/share/ruby/vendor_ruby/puppet/configurer.rb:120:in
block in apply_catalog' /usr/share/ruby/vendor_ruby/puppet/util.rb:161:inblock in benchmark' /usr/share/ruby/benchmark.rb:296:in
realtime' /usr/share/ruby/vendor_ruby/puppet/util.rb:160:inbenchmark' /usr/share/ruby/vendor_ruby/puppet/configurer.rb:119:in
apply_catalog' /usr/share/ruby/vendor_ruby/puppet/configurer.rb:227:inrun_internal' /usr/share/ruby/vendor_ruby/puppet/configurer.rb:134:in
block in run' /usr/share/ruby/vendor_ruby/puppet/context.rb:64:inoverride' /usr/share/ruby/vendor_ruby/puppet.rb:244:in
override' /usr/share/ruby/vendor_ruby/puppet/configurer.rb:133:inrun' /usr/share/ruby/vendor_ruby/puppet/application/apply.rb:297:in
apply_catalog' /usr/share/ruby/vendor_ruby/puppet/application/apply.rb:231:inblock in main' /usr/share/ruby/vendor_ruby/puppet/context.rb:64:in
override' /usr/share/ruby/vendor_ruby/puppet.rb:244:inoverride' /usr/share/ruby/vendor_ruby/puppet/application/apply.rb:193:in
main' /usr/share/ruby/vendor_ruby/puppet/application/apply.rb:154:inrun_command' /usr/share/ruby/vendor_ruby/puppet/application.rb:381:in
block (2 levels) in run' /usr/share/ruby/vendor_ruby/puppet/application.rb:507:inplugin_hook' /usr/share/ruby/vendor_ruby/puppet/application.rb:381:in
block in run' /usr/share/ruby/vendor_ruby/puppet/util.rb:488:inexit_on_fail' /usr/share/ruby/vendor_ruby/puppet/application.rb:381:in
run' /usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:146:inrun' /usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:92:in
execute' /bin/puppet:8:in `Kould also be my config as kubectl config view --raw=true apiVersion: v1 clusters: [] contexts: [] current-context: "" kind: Config preferences: {} users: []
Which gives an empty context ..