当前位置: 首页 > 软件库 > 云计算 > 云原生 >

jkube

Successor of the deprecated Fabric8 Maven Plugin
授权协议 EPL-2.0 License
开发语言 Google Go
所属分类 云计算、 云原生
软件类型 开源软件
地区 不详
投 递 者 颜镜
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Eclipse JKube

Cloud-Native Java Applications without a hassle

KataCoda

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 see REBRANDING.md

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

OpenShift Maven Plugin

JKube Kit

JKube Kit is the core engine powering our Maven plugins.

The main difference between Fabric8 Maven Plugin and JKube is the extraction and decoupling of the core components fromMaven. This enables other projects and frameworks to reuse all of JKube's functionality by exposing it through a public API.

  • Generator framework for automatically generating Docker images by examining project information.
  • Enricher framework for creating and enhancing Kubernetes and OpenShift resources.
  • Profile combining the configuration for generators and enrichers.
  • Resource configuration model objects for a simplified configuration of Kubernetes and OpenShift resources.
  • Image configuration model objects for modeling Docker image configuration as used in docker-maven-plugin.

Some thin adapter Maven specific modules like jkube-kit-enricher-maven andjkube-kit-generator-maven are provided as glue to get to the Maven specific build informationlike the project's coordinates.

Getting started

Want to test drive JKube? check our getting started Katacoda courseto see what JKube can do for you and your project directly from your browser.

Check out our Maven quickstarts to see how JKube fitswith the Java framework of your choice.https://github.com/eclipse/jkube/tree/master/quickstarts/maven

Hello World using Eclipse JKube

  • Clone repository and move to quickstart helloworld sample, build project and run JKube goals:
# 1. Clone repository and move to Hello World Quickstart
$ git clone git@github.com:eclipse/jkube.git && cd jkube/quickstarts/maven/hello-world

# 2. 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 pods
NAME                                       READY   STATUS        RESTARTS   AGE
helloworld-7c4665f464-xwskj                0/1     Completed     2          27s
$ kubectl logs jkube-sample-helloworld-7c4665f464-xwskj
Hello World!
# Using JKube
$ mvn k8s:log
[INFO] k8s:  [NEW] helloworld-7c4665f464-xwskj status: Running 
[INFO] k8s:  [NEW] Tailing log of pod: helloworld-587dfff745-2kdpq
[INFO] k8s:  [NEW] Press Ctrl-C to stop tailing the log
[INFO] k8s:  [NEW] 
[INFO] k8s: Hello World!
[INFO] k8s:  [NEW] helloworld-7c4665f464-xwskj status: Running

Troubleshooting

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

$ eval $(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.

  • JKube 的作用 JKube 省去了配置  Dockerfile, k8s manifest 的过程。自动化了 docker 镜像的构建。极大提高了 Java 应用云原生环境集成的效率。 使用 JKube 来构建 Java 应用的镜像, 只需要引入 kubernetes-maven-plugin 就可以了。 JKube 的工作原理 这个 插件在执行 build, push 命令的时候,会使用自动

相关阅读

相关文章

相关问答

相关文档