14 lines
4.4 KiB
HTML
14 lines
4.4 KiB
HTML
<html><head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
<title>140. Kubernetes Ecosystem Awareness</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="multi_spring-cloud.html" title="Spring Cloud"><link rel="up" href="multi__spring_cloud_kubernetes.html" title="Part XVII. Spring Cloud Kubernetes"><link rel="prev" href="multi__ribbon_discovery_in_kubernetes.html" title="139. Ribbon Discovery in Kubernetes"><link rel="next" href="multi__pod_health_indicator.html" title="141. 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">140. Kubernetes Ecosystem Awareness</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__ribbon_discovery_in_kubernetes.html">Prev</a> </td><th width="60%" align="center">Part XVII. Spring Cloud Kubernetes</th><td width="20%" align="right"> <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>140. Kubernetes Ecosystem Awareness</h2></div></div></div><p>All of the features described earlier in this guide work equally well, regardless of whether your application is running inside
|
|
Kubernetes. This is really helpful for development and troubleshooting.
|
|
From a development point of view, this lets you start your Spring Boot application and debug one
|
|
of the modules that is part of this project. You need not 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 that can
|
|
communicate by using <code class="literal">http</code> protocol to the REST API of the 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>140.1 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> automatically gets activated.
|
|
This lets you customize the configuration, to define beans that are applied when the Spring Boot application is deployed
|
|
within the Kubernetes platform (for example, different development and production configuration).</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_istio_awareness" href="#_istio_awareness"></a>140.2 Istio Awareness</h2></div></div></div><p>When you include the <code class="literal">spring-cloud-kubernetes-istio</code> module in the application classpath, a new profile is added to the application,
|
|
provided the application is running inside a Kubernetes Cluster with <a class="link" href="https://istio.io" target="_top">Istio</a> installed. You can then use
|
|
spring <code class="literal">@Profile("istio")</code> annotations in your Beans and <code class="literal">@Configuration</code> classes.</p><p>The Istio awareness module uses <code class="literal">me.snowdrop:istio-client</code> to interact with Istio APIs, letting us discover traffic rules, circuit breakers, and so on,
|
|
making it easy for our Spring Boot applications to consume this data to dynamically configure themselves according to 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> </td><td width="20%" align="center"><a accesskey="u" href="multi__spring_cloud_kubernetes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="multi__pod_health_indicator.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">139. Ribbon Discovery in Kubernetes </td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud.html">Home</a></td><td width="40%" align="right" valign="top"> 141. Pod Health Indicator</td></tr></table></div></body></html> |