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 in Puppet by Mike
17 views

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
clusters:
- cluster:
server: http://localhost:8080
  name: test-doc
contexts:
- 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 by Sirajul
• 26,100 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 in Puppet by Sirajul
• 26,100 points
17 views
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 in Puppet by Sirajul
• 26,100 points
20 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17 in Others by anonymous
2,182 views
+3 votes
1 answer
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 in Puppet by Sirajul
• 26,100 points
27 views
0 votes
1 answer

what is the puppet module command?

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

answered Jul 29 in Puppet by Sirajul
• 26,100 points
18 views