Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Build and Deploy java applications on Kubernetes

License

NotificationsYou must be signed in to change notification settings

eclipse-jkube/jkube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud-Native Java Applications without a hassle

E2E TestsMaintainability RatingCoverageGitterTwitter

Open in Gitpod

Eclipse JKube

Contents

Introduction

Eclipse JKube is a collection of plugins and libraries that are used for building container images using Docker, JIB orS2I build strategies. Eclipse JKube generates and deploys Kubernetes/OpenShift manifests at compile time too.

It brings your Java applications on to Kubernetes and OpenShift by leveraging the tasks required to make yourapplication cloud-native.

Eclipse JKube also provides a set of tools such as watch, debug, log, etc. to improve your developer experience.This project contains various building blocks for the Kubernetes Java developer toolbox.

Kubernetes Maven Plugin

  • Maven Central
  • Documentation
  • Add to project:
    <plugin>  <groupId>org.eclipse.jkube</groupId>  <artifactId>kubernetes-maven-plugin</artifactId>  <version>${jkube.version}</version></plugin>
  • Run the JKube commands, for instance:
    mvn package k8s:build k8s:push k8s:resource k8s:apply
  • 📺 Watch 2-minute demo on YouTube:

KubernetesMavenPluginDemo

Kubernetes Gradle Plugin

  • Maven Central
  • Documentation
  • Add to project:
    plugins {  id"org.eclipse.jkube.kubernetes" version"${jKubeVersion}"}
  • Run the JKube commands, for instance:
    gradle build k8sBuild k8sPush k8sResource k8sApply
  • 📺 Watch 2-minute demo on YouTube:

KubernetesGradlePluginDemo

OpenShift Gradle Plugin

  • Maven Central
  • Documentation
  • Add to project:
    plugins {  id"org.eclipse.jkube.openshift" version"${jKubeVersion}"}
  • Run the JKube commands, for instance:
    gradle build ocBuild ocResource ocApply
  • 📺 Watch 2-minute demo on YouTube:

OpenShiftGradlePluginDemo

OpenShift Maven Plugin

  • Maven Central
  • Documentation
  • Add to project:
    <plugin>  <groupId>org.eclipse.jkube</groupId>  <artifactId>openshift-maven-plugin</artifactId>  <version>${jkube.version}</version></plugin>
  • Run the JKube commands, for instance:
    mvn package oc:build oc:resource oc:apply
  • 📺 Watch 2-minute demo on YouTube:

OpenShiftMavenPluginDemo

Getting started

You can take a look at our quickstarts inquickstarts directory that contain sample maven and gradle projects using the latest version of jkube plugin.

Hello World using Eclipse JKube

  • Clone repository and move to quickstarthelloworld sample, build project and run JKube goals:
# 1. Clone repository$ git clone git@github.com:eclipse/jkube.git# 2. Move to Hello World Quickstart folder$cd jkube/quickstarts/maven/hello-world# 3. Configure your local environment to re-use the Docker daemon inside the Minikube instance.~ jkube/quickstarts/maven/hello-world: $eval$(minikube -p minikube docker-env)# 4. Build Project and run JKube goals$ mvn clean install                                                            \  k8s:build`# Build Docker Image`                                     \  k8s:resource`# Generate Kubernetes Manifests`                          \  k8s:apply`# Apply generated Kubernetes Manifests onto Kubernetes`
  • Check created pod logs:
# Using Kubectl$ kubectl get podsNAME                          READY   STATUS    RESTARTS   AGEhelloworld-664bf5fdff-2bmrt   1/1     Running   0          9s$ kubectl get svchelloworld   NodePort    10.110.92.145<none>        8080:32353/TCP   58mkubernetes   ClusterIP   10.96.0.1<none>        443/TCP          7h$ curl`minikube ip`:32353/helloHello World

Troubleshooting

If you experience problems using minikube that pod's status shows 'ImagePullBackOff' and not 'Running' you must share the minikube's docker daemon environment with your shell with:

$eval$(minikube -p minikube docker-env)

You can remove this from your shell again with:

$eval$(minikube docker-env -u)

If you don't want to type the command for every new terminal you open, you can add the command to your.bash_profileon mac or.zshrc.

Rebranding Notice 📢

This project is not an effort from scratch. It was earlier calledFabric8 Maven Plugin.It is just refactored and rebranded version of the project targeted towards Java developers who are working on top ofKubernetes. For more information about history, please seeREBRANDING.md


[8]ページ先頭

©2009-2025 Movatter.jp