Puppet Kubernetes Puppet resource command doesn t return the pod information

0 votes

I am using kubernetes with puppet with the help of puppet kubernetes module to manage pods of my kubernetes cluster as explained in this : https://github.com/garethr/garethr-kubernetes/blob/master/README.md

on executing the following command:

puppet resource kubernetes_pod

It doesn't return any pod information, instead it returns an empty line.

I am using a minikube k8s cluster to test the puppet module against : cat /etc/puppetlabs/puppet/kubernetes.conf

apiVersion: v1 clusters: - cluster: certificate-authority: /root/.minikube/ca.crt server: https://<ip address>:8443 name: minikube contexts: - context: cluster: minikube user: minikube name: minikube current-context: minikube kind: Config preferences: {} users: - name: minikube user: client-certificate: /root/.minikube/apiserver.crt client-key: /root/.minikube/apiserver.key

Communication with K8s REST API is successful on using curl command with the certs.

curl --cacert /root/.minikube/ca.crt --cert /root/.minikube/apiserver.crt --key /root/.minikube/apiserver.key https://<minikube ip>:844/api/v1/pods/
Aug 22, 2019 in Puppet by Mike

1 answer to this question.

0 votes

This could probably be a credentials issue or might be that you might have configured an empty namespace.

Make sure if kubectl get pods works fine, and that  ~/.puppetlabs/etc/puppet/kubernetes.conf file is generated as suggested:

mc0e@xxx:~$ kubectl config view --raw=true
apiVersion: v1
- cluster:
server: http://localhost:8080
  name: test-doc
- context:
cluster: test-doc
user: ""
  name: test-doc
current-context: test-doc
kind: Config
preferences: {}
users: []

There might be some version issues too..the module that you are using might not be updated, compatible with kubeclient gem version.

answered Aug 22, 2019 by Sirajul
• 59,230 points
Puppet+Kubernetes : Credential Configuration during set up.

Related Questions In Puppet

0 votes
1 answer

what is the usage of Puppet apply command?

Puppet apply- Applies a standalone Puppet manifest to ...READ MORE

answered Jul 30, 2019 in Puppet by Sirajul
• 59,230 points
0 votes
1 answer

Puppet: puppet agent --configprint server doesn't return a valid DNS name.

Agents trust the master only if they ...READ MORE

answered Aug 2, 2019 in Puppet by Sirajul
• 59,230 points
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,543 views
0 votes
1 answer

Can somebody explain the process of installing modules from the command line in puppet?

Puppet module install command installs a module ...READ MORE

answered Jul 25, 2019 in Puppet by Sirajul
• 59,230 points
0 votes
1 answer

what is the puppet module command?

This command provides an interface for managing ...READ MORE

answered Jul 29, 2019 in Puppet by Sirajul
• 59,230 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP