Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piomin/kubernetes-quickstart
Demo Java apps for several scenarios on Kubernetes
https://github.com/piomin/kubernetes-quickstart
java jib kafka kubernetes skaffold spring-boot
Last synced: 20 days ago
JSON representation
Demo Java apps for several scenarios on Kubernetes
- Host: GitHub
- URL: https://github.com/piomin/kubernetes-quickstart
- Owner: piomin
- Created: 2023-11-06T08:37:55.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-09T19:46:16.000Z (about 1 month ago)
- Last Synced: 2024-10-10T20:54:58.050Z (about 1 month ago)
- Topics: java, jib, kafka, kubernetes, skaffold, spring-boot
- Language: Java
- Homepage: https://piotrminkowski.com/
- Size: 37.1 KB
- Stars: 22
- Watchers: 3
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Demo Java Apps for Kubernetes [![Twitter](https://img.shields.io/twitter/follow/piotr_minkowski.svg?style=social&logo=twitter&label=Follow%20Me)](https://twitter.com/piotr_minkowski)
In this repository, you will find the simple Java apps to run on Kubernetes for a particular scenario.
Currently, there are apps for:
- Kafka (`kafka` directory)In order to easily run the apps directly from the source you need to install `skaffold`.
## Articles
I'm using those apps in the several articles on my blog. Here's the list:
1. How to run and manage Kafka on Kubernetes with the Strimzi operator. We run two simple apps for sending messages (`kafka/producer`) and receiving them for Kafka topic (`kafka/consumer`). A detailed guide may be found in the following article: [Apache Kafka on Kubernetes with Strimzi](https://piotrminkowski.com/2023/11/06/apache-kafka-on-kubernetes-with-strimzi/)## Usage
In order to run the example apps you need to have:
- JDK17+
- Maven
- [Skaffold](https://skaffold.dev/)
- Kubernetes cluster### Apache Kafka
Go to the `kafka` directory. It contains to sample apps: `producer` and `consumer`.
To run them on Kubernetes just execute:
```shell
skaffold run --tail
```You can also automatically create and configure Kafka based on Strimzi by activating the `kafka-strimzi` profile:
```shell
skaffold run --tail -p kafka-strimzi
```
However, first you need to install Strimzi, e.g. using its Helm chart:
```shell
helm repo add strimzi https://strimzi.io/charts
helm install strimzi-kafka-operator strimzi/strimzi-kafka-operator
```