Yes, it is quite possible to create or manage resources in kubernetes using Puppet DSL. For this you would need to install a module called "garethr/kubernetes". It is actually designed for creating resources in Kubernetes.
Setup:
Assuming you have a Kubernetes cluster up and running.
- Installing the Kubernetes module:
Install the required gems with this command:
/opt/puppetlabs/puppet/bin/gem install activesupport -v 4.1.14
/opt/puppetlabs/puppet/bin/gem install kubeclient --no-ri --no-rdoc
You can provide the required information in a standard kubectl configuration file. Store this as kubernetes.conf in the relevant confdir.
If you have a working kubectl setup you can export the file using the following command:
kubectl config view --raw=true
- Finally install the module with:
puppet module install garethr-kubernetes
For more info on creating and managing resources refer to: https://forge.puppet.com/garethr/kubernetes