Giter Site home page Giter Site logo

petenorth / micronaut-tutorial-1 Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 115 KB

Running Sergio del Amo Caballero's Micronaut tutorial on Kubernetes

Dockerfile 3.05% Groovy 16.64% Java 40.63% Kotlin 7.75% Smarty 31.92%
micronaut micronautfw openshift kubernetes docker helm helm-charts

micronaut-tutorial-1's Introduction

micronaut-tutorial-1

This project is probably superceeded by https://micronaut-projects.github.io/micronaut-kubernetes/snapshot/guide/

Modifying https://www.infoq.com/articles/micronaut-tutorial-microservices-jvm?utm_source=infoq&utm_campaign=user_page&utm_medium=link to run in a Kubernetes and Openshift environment.

When running in Openshift, Micronaut detects two environments 'k8s' and 'cloud' . The detection of 'k8s' means that Kubernetes based service discovery can be used.

To this end the Consul based service discovery is now not enabled by default and requires the enabling of a 'consul' environment' this activates the application-consul.yml files.

Run/Deploy Style Status Service Discovery Method Tracing Method
Running Locally Consul
Running in Openshift Kubernetes
Running in Kubernetes Kubernetes
Deploy using Helm Charts Kubernetes
Running in Kubernetes with Zipkin TODO Kubernetes Zipkin
Running in Kubernetes with Consul Not Working (see note below) Consul
Running in Kubernetes with Istio TODO Istio Istio

It is arguable that running Consul on Kubernetes as a way of supporting service discovery is misguided. Having investigated the technical overhead (running stateful sets, the presence of Zookeeper and the addition of ConsulDNS), coupled with not managing to get it to run successfully leads to think 'why do this?'. The problem with using Consul on Kubernetes seems to be that the service is registered with Consul using the pod's host name which is random and not resolvable when a client attempts to use the service.

The Kubernetes Service Discovery is not dynamic in the sense that the pods must be created after the services have been defined otherwise the environment variables used by the micronaut's (and most other frameworks) Kubernetes service discovery mechanism will not be defined, but other than this it is simple and reliable.

micronaut-tutorial-1's People

Contributors

petenorth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

micronaut-tutorial-1's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.