npm package: @smartive/generator-k8s
Description: Yeoman generator for kubernetes resources
Author: Christoph Bühler
Latest version: 1.0.0

## Yeoman generator for k8s resources

This is a yeoman generator for kubernetes resources.

[![Build Status](https://travis-ci.org/smartive/generator-k8s.svg)](https://travis-ci.org/smartive/generator-k8s)
[![Build Status](https://ci.appveyor.com/api/projects/status/x1fducsoh3gyafr6?svg=true)](https://ci.appveyor.com/project/smartive-ci/generator-k8s)
[![Code Coverage](https://codecov.io/gh/smartive/generator-k8s/branch/master/graph/badge.svg)](https://codecov.io/gh/smartive/generator-k8s)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Greenkeeper badge](https://badges.greenkeeper.io/smartive/generator-k8s.svg)](https://greenkeeper.io/)
[![npm](https://img.shields.io/npm/v/@smartive/generator-k8s.svg?maxAge=3600)](https://www.npmjs.com/package/@smartive/generator-k8s)

## Installation

To install this package, simply run

[![NPM](https://nodei.co/npm/@smartive/generator-k8s.png?downloads=true&stars=true)](https://nodei.co/npm/@smartive/generator-k8s/)

## Usage

Install `yeoman` (if haven't already) `npm i -g yo`.
After you installed this package, use:

```bash
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](https://github.com/semantic-release/semantic-release) and is located under
the [release section](https://github.com/smartive/generator-k8s/releases).

## Licence

This software is licenced under the [MIT](LICENSE) licence.