CLI command shared-pod-template is returning always an empty list


After running the shared-pod-template CLI command as described in Export Kubernetes (shared) pod template definitions from CloudBees CI Operations Center and masters, the output is always an empty list.

$ java -jar jenkins-cli.jar -s https://cloudbees-core-url:port-number/cjoc/ shared-pod-template


Related Issue(s)

  • CTR-2373: ‘shared-pod-template’ CLI command look for old shared cloud name


The problem behind this is that in version of Operations Center Kubernetes Cloud Plugin (released as part of CloudBees CI on modern cloud platform, the name of the default kubernetes shared cloud changed from kubernetes shared cloud to kubernetes-shared-cloud.

However, the shared-pod-template CLI command was not updated to read the new location and is still looking for the old name (kubernetes shared cloud).

If the first installation of your cluster is based on CloudBees CI on modern cloud platform or a higher version, the default kubernetes shared cloud will be named as kubernetes-shared-cloud, so the shared-pod-template CLI command won’t be able to read the shared pod templates.

The problem is fixed in of Operations Center Kubernetes Cloud Plugin that supports both kubernetes-shared-cloud and kubernetes shared cloud. It is available since CloudBees CI


Upgrade CloudBees CI to version or later.


In the meantime, the issue can be worked around by renaming the $JENKINS_HOME/kubernetes-shared-cloud directory to $JENKINS_HOME/kubernetes shared cloud and restarting the Operation Center.

Have more questions?


Please sign in to leave a comment.