Fork me on GitHub

Create Kuberentes yamls

This is a simple maven plugin to create a Kuberenetes deployment, service and ingress yaml file. The files can then be used to the application to kubernetes.

When you run the plugin, the files are written out to the target folder.

To use this

Generating Kubernetes yamls

    <build>
        <plugins>
        ....
            <plugin>
                <groupId>io.github.parj</groupId>
                <artifactId>createk8syaml-maven-plugin</artifactId>
                <version>0.0.5</version>
                <configuration>
                    <namespace>thisisaspace</namespace>
                    <image>gcr.io/etc</image>
                    <path>/foo</path>
                    <host>localhost</host>
                </configuration>
                <executions>
                    <execution>
                      <phase>package</phase>
                      <goals>
                          <goal>generate</goal>
                      </goals>
                    </execution>
                </executions>
            </plugin>

Deploying to Kubernetes

    <build>
        <plugins>
        ....
            <plugin>
                <groupId>io.github.parj</groupId>
                <artifactId>createk8syaml-maven-plugin</artifactId>
                <version>0.0.5</version>
                <executions>
                    <execution>
                      <phase>package</phase>
                      <goals>
                          <goal>deploy</goal>
                      </goals>
                    </execution>
                </executions>
            </plugin>

Prerequisites

The plugin requires Maven 3.5.0 or later and Java 8 or later.