Files
spring-cloud-static/Greenwich.RELEASE/multi/multi__kubernetes_ecosystem_awareness.html
2019-01-22 19:26:25 -05:00

14 lines
4.5 KiB
HTML

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>139.&nbsp;Kubernetes Ecosystem Awareness</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="multi_spring-cloud.html" title="Spring Cloud"><link rel="up" href="multi__spring_cloud_kubernetes.html" title="Part&nbsp;XVII.&nbsp;Spring Cloud Kubernetes"><link rel="prev" href="multi__ribbon_discovery_in_kubernetes.html" title="138.&nbsp;Ribbon discovery in Kubernetes"><link rel="next" href="multi__pod_health_indicator.html" title="140.&nbsp;Pod Health Indicator"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">139.&nbsp;Kubernetes Ecosystem Awareness</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__ribbon_discovery_in_kubernetes.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;XVII.&nbsp;Spring Cloud Kubernetes</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="multi__pod_health_indicator.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="_kubernetes_ecosystem_awareness" href="#_kubernetes_ecosystem_awareness"></a>139.&nbsp;Kubernetes Ecosystem Awareness</h2></div></div></div><p>All of the features described above will work equally well regardless of whether your application is running inside
Kubernetes or not. This is really helpful for development and troubleshooting.
From a development point of view, this is really helpful as you can start your Spring Boot application and debug one
of the modules part of this project. It is not required to deploy it in Kubernetes
as the code of the project relies on the
<a class="link" href="https://github.com/fabric8io/kubernetes-client" target="_top">Fabric8 Kubernetes Java client</a> which is a fluent DSL able to
communicate using <code class="literal">http</code> protocol to the REST API of Kubernetes Server.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_kubernetes_profile_autoconfiguration" href="#_kubernetes_profile_autoconfiguration"></a>139.1&nbsp;Kubernetes Profile Autoconfiguration</h2></div></div></div><p>When the application runs as a pod inside Kubernetes a Spring profile named <code class="literal">kubernetes</code> will automatically get activated.
This allows the developer to customize the configuration, to define beans that will be applied when the Spring Boot application is deployed
within the Kubernetes platform <span class="strong"><strong>(e.g. different dev and prod configuration)</strong></span>.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_istio_awareness" href="#_istio_awareness"></a>139.2&nbsp;Istio Awareness</h2></div></div></div><p>When including the <span class="strong"><strong>spring-cloud-kubernetes-istio</strong></span> module into the application classpath a new profile will be added to the application,
if the application is running inside a Kubernetes Cluster with <a class="link" href="http://istio.io" target="_top">Istio</a> installed. Then you can use
spring <span class="strong"><strong>@Profile("istio")</strong></span> annotations into your Beans and <span class="strong"><strong>@Configuration</strong></span>'s.</p><p>The Istio awareness module uses the <span class="strong"><strong>me.snowdrop:istio-client</strong></span> to interact with Istio APIs enabling us to discover traffic rules, circuit breakers, etc.
Making it easy for our Spring Boot applications to consume this data to dynamically configure themselves according the environment.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__ribbon_discovery_in_kubernetes.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="multi__spring_cloud_kubernetes.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi__pod_health_indicator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">138.&nbsp;Ribbon discovery in Kubernetes&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;140.&nbsp;Pod Health Indicator</td></tr></table></div></body></html>