All Projects → arun-gupta → kubernetes-maven

arun-gupta / kubernetes-maven

Licence: other
Fabric8 Maven plugin to deploy Java applications to Kubernetes

Programming Languages

java
68154 projects - #9 most used programming language

Kubernetes Maven Sample

This example will show how to deploy a Java application to a Kubernetes cluster using Maven. It requires to run a Couchbase server that can be easily started on AWS or using Docker.

Main Targets

  1. package: Builds the WAR file

  2. install: Builds the WAR and Docker image using it

  3. exec:java: Runs the application with a Couchbase server running on localhost

  4. fabric8:apply: Deploys the application to Kubernetes, require install target to be invoked first

    1. By default, the Kubernetes cluster is localhost. Set KUBERNETES_MASTER environment variable to point to Kubernetes master.

Additional Targets

  1. fabric8:build: Builds the Docker image and generated Kubernetes resources

  2. fabric8:resource: Generates the Kubernetes configuration file in target/classes/META-INF/fabric8 directory

  3. fabric8:cluster-start: Bootstrap a Kubernetes cluster using minikube (download, install and run)

More content on deploying your Java applications with Kubernetes at https://github.com/arun-gupta/kubernetes-java-sample/.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].