@smartive/generator-k8s
v1.0.0
Published
Yeoman generator for kubernetes resources
Downloads
4
Readme
Yeoman generator for k8s resources
This is a yeoman generator for kubernetes resources.
Installation
To install this package, simply run
Usage
Install yeoman
(if haven't already) npm i -g yo
.
After you installed this package, use:
yo k8s
All detailed generators are described below.
Usage (detail)
Default
Command: yo k8s
This launches the resource generator which asks which parts you want to configure. All parts are concatenated into one file after all questions are answered.
With this generator, you can generate a full deployment with service, app, ingress and other things.
Config
Command: yo k8s:config
This generates a ConfigMap
for k8s. During the questions, you can enter config map values
with your configured $EDITOR
if you wish to do so.
Empty lines and lines that start with #
are ignored after you close the editor.
Deployment
Command: yo k8s:deployment
This generates a Deployment
for k8s. You have to enter some values to
generate the yml structure. If you've configured a PersistentVolumeClaim
it's added to the bottom.
Ingress
Command: yo k8s:ingress
This generates an Ingress
for k8s. You can enter multiple host urls, which are
then configured the correct way. You can decide if you want to disable HTTPS.
PersistentVolumeClaim
Command: yo k8s:persistent-volume-claim
This generates a PersistentVolumeClaim
for k8s. You need to enter access modes and a size for the claim.
Secret
Command: yo k8s:secret
This generates a Secret
for k8s. During the questions, you can enter secret values
with your configured $EDITOR
if you wish to do so.
Empty lines and lines that start with #
are ignored after you close the editor.
After the editor is closed, all values after the colon are base64 encoded.
foo: bar
becomes foo: IGJhcg==
.
Service
Command: yo k8s:service
This generates a Service
for k8s. You can add multiple ports for the service which are then
added to the resulting yml.
Changelog
The changelog is generated by semantic release and is located under the release section.
Licence
This software is licenced under the MIT licence.