Skip to content

Commit

Permalink
Deployed a3144ac with MkDocs version: 1.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Eitan Suez committed Feb 15, 2024
1 parent 9ae642a commit 9c21db7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ <h2 id="deploy-the-sleep-client">Deploy the <code>sleep</code> client<a class="h
<p>We make use of Istio's <a href="https://github.com/istio/istio/tree/master/samples/sleep">sleep</a> sample application to facilitate the task of making calls to workloads from inside the cluster.</p>
<p>The <code>sleep</code> deployment is a blank client Pod that can be used to send direct calls to specific microservices from within the Kubernetes cluster.</p>
<p>Deploy <a href="https://github.com/spring-petclinic/spring-petclinic-istio/blob/master/manifests/sleep.yaml"><code>sleep</code></a> to your cluster:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.2/samples/sleep/sleep.yaml
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.3/samples/sleep/sleep.yaml
</code></pre></div>
<p>Wait for the sleep pod to be ready (2/2 containers).</p>
<h2 id="test-individual-service-endpoints">Test individual service endpoints<a class="headerlink" href="#test-individual-service-endpoints" title="Permanent link">&para;</a></h2>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@

<h1 id="introduction">Introduction<a class="headerlink" href="#introduction" title="Permanent link">&para;</a></h1>
<p>A great deal of "cruft" accumulates inside many files in <a href="https://github.com/spring-petclinic/spring-petclinic-cloud"><code>spring-petclinic-cloud</code></a>: configuration for service discovery, load balancing, routing, retries, resilience, and so on.</p>
<p>When you move to Istio, you get separation of concerns. It's ironic that the Spring framework's raison d'être was separation of concerns, but its focus is inside a monolithic application, not between microservices. When you move to cloud-native applications, you end up with a tangle of concerns that Istio helps you untangle.</p>
<p>When you move to Istio, you get separation of concerns. It's ironic that the Spring framework's raison d'être is separation of concerns, but its focus is inside a monolithic application, not between microservices. When you move to cloud-native applications, you end up with a tangle of concerns that Istio helps you untangle.</p>
<p>And, little by little, our apps become sane again. It reminds me of one of Antoine de Saint-Exupéry's famous quotes:</p>
<blockquote>
<p>Perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away</p>
Expand Down
18 changes: 11 additions & 7 deletions observability/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ <h3 id="observe-distributed-traces">Observe distributed traces<a class="headerli
<ol>
<li>
<p>Deploy Jaeger:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.2/samples/addons/jaeger.yaml
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.3/samples/addons/jaeger.yaml
</code></pre></div>
</li>
<li>
Expand Down Expand Up @@ -704,18 +704,21 @@ <h2 id="exposing-metrics">Exposing metrics<a class="headerlink" href="#exposing-
<p>Istio has built-in support for <a href="https://prometheus.io/">Prometheus</a> as a mechanism for metrics collection.</p>
<p>Each Spring Boot application is configured with a <a href="https://github.com/spring-petclinic/spring-petclinic-istio/blob/master/petclinic-customers-service/pom.xml#L55-L58">micrometer dependency</a> to expose a scrape endpoint for Prometheus to collect metrics.</p>
<p>Call the scrape endpoint and inspect the metrics exposed directly by the Spring Boot application:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>kubectl<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>deploy/customers-v1<span class="w"> </span>-c<span class="w"> </span>istio-proxy<span class="w"> </span>--<span class="w"> </span>curl<span class="w"> </span>-s<span class="w"> </span>localhost:8080/actuator/prometheus
<div class="highlight"><pre><span></span><code><a id="__codelineno-4-1" name="__codelineno-4-1" href="#__codelineno-4-1"></a>kubectl<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>deploy/customers-v1<span class="w"> </span>-c<span class="w"> </span>istio-proxy<span class="w"> </span>--<span class="w"> </span><span class="se">\</span>
<a id="__codelineno-4-2" name="__codelineno-4-2" href="#__codelineno-4-2"></a><span class="w"> </span>curl<span class="w"> </span>-s<span class="w"> </span>localhost:8080/actuator/prometheus
</code></pre></div>
<p>Separately, Envoy collects a variety of metrics, often referred to as RED metrics, for: Requests, Errors, and Durations.</p>
<p>Inspect the metrics collected and exposed by the Envoy sidecar:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a>kubectl<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>deploy/customers-v1<span class="w"> </span>-c<span class="w"> </span>istio-proxy<span class="w"> </span>--<span class="w"> </span>curl<span class="w"> </span>-s<span class="w"> </span>localhost:15090/stats/prometheus
<div class="highlight"><pre><span></span><code><a id="__codelineno-5-1" name="__codelineno-5-1" href="#__codelineno-5-1"></a>kubectl<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>deploy/customers-v1<span class="w"> </span>-c<span class="w"> </span>istio-proxy<span class="w"> </span>--<span class="w"> </span><span class="se">\</span>
<a id="__codelineno-5-2" name="__codelineno-5-2" href="#__codelineno-5-2"></a><span class="w"> </span>curl<span class="w"> </span>-s<span class="w"> </span>localhost:15090/stats/prometheus
</code></pre></div>
<p>One common metric to note is the counter <code>istio_requests_total</code>:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-6-1" name="__codelineno-6-1" href="#__codelineno-6-1"></a>kubectl<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>deploy/customers-v1<span class="w"> </span>-c<span class="w"> </span>istio-proxy<span class="w"> </span>--<span class="w"> </span><span class="se">\</span>
<a id="__codelineno-6-2" name="__codelineno-6-2" href="#__codelineno-6-2"></a><span class="w"> </span>curl<span class="w"> </span>-s<span class="w"> </span>localhost:15090/stats/prometheus<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>istio_requests_total
</code></pre></div>
<p>Both the application metrics and envoy's metrics are aggregated (merged) and exposed on port 15020:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a>kubectl<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>deploy/customers-v1<span class="w"> </span>-c<span class="w"> </span>istio-proxy<span class="w"> </span>--<span class="w"> </span>curl<span class="w"> </span>-s<span class="w"> </span>localhost:15020/stats/prometheus
<div class="highlight"><pre><span></span><code><a id="__codelineno-7-1" name="__codelineno-7-1" href="#__codelineno-7-1"></a>kubectl<span class="w"> </span><span class="nb">exec</span><span class="w"> </span>deploy/customers-v1<span class="w"> </span>-c<span class="w"> </span>istio-proxy<span class="w"> </span>--<span class="w"> </span><span class="se">\</span>
<a id="__codelineno-7-2" name="__codelineno-7-2" href="#__codelineno-7-2"></a><span class="w"> </span>curl<span class="w"> </span>-s<span class="w"> </span>localhost:15020/stats/prometheus
</code></pre></div>
<p>What allows Istio to aggregate both scrape endpoints are annotations placed in the pod template specification for each application, communicating the URL of the Prometheus scrape endpoint.</p>
<p>For example, <a href="https://github.com/spring-petclinic/spring-petclinic-istio/blob/master/manifests/deploy/customers-service.yaml#L40-L43">here are the prometheus annotations</a> for the <code>customers</code> service.</p>
Expand All @@ -729,7 +732,7 @@ <h2 id="send-requests-to-the-application">Send requests to the application<a cla
<p>Open a separate terminal in which to run subsequent commands.</p>
<h2 id="the-prometheus-dashboard">The Prometheus dashboard<a class="headerlink" href="#the-prometheus-dashboard" title="Permanent link">&para;</a></h2>
<p>Deploy Prometheus to your Kubernetes cluster:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.2/samples/addons/prometheus.yaml
<div class="highlight"><pre><span></span><code><a id="__codelineno-9-1" name="__codelineno-9-1" href="#__codelineno-9-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.3/samples/addons/prometheus.yaml
</code></pre></div>
<p>The latest version of Spring Boot (3.2) takes advantage of a relatively recent feature of Prometheus known as "exemplars." The current version of Istio uses an older version of Prometheus (2.41) that does not yet support exemplars.</p>
<p>Before deploying Prometheus, patch the prometheus deployment to use the latest version of the image:</p>
Expand Down Expand Up @@ -770,7 +773,7 @@ <h2 id="the-prometheus-dashboard">The Prometheus dashboard<a class="headerlink"
<h2 id="istios-grafana-metrics-dashboards">Istio's Grafana metrics dashboards<a class="headerlink" href="#istios-grafana-metrics-dashboards" title="Permanent link">&para;</a></h2>
<p>Istio provides standard service mesh dashboards, based on the standard metrics collected by Envoy and sent to Prometheus.</p>
<p>Deploy Grafana:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-15-1" name="__codelineno-15-1" href="#__codelineno-15-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.2/samples/addons/grafana.yaml
<div class="highlight"><pre><span></span><code><a id="__codelineno-15-1" name="__codelineno-15-1" href="#__codelineno-15-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.3/samples/addons/grafana.yaml
</code></pre></div>
<p>Launch the Grafana dashboard:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-16-1" name="__codelineno-16-1" href="#__codelineno-16-1"></a>istioctl<span class="w"> </span>dash<span class="w"> </span>grafana
Expand Down Expand Up @@ -803,7 +806,7 @@ <h2 id="kiali">Kiali<a class="headerlink" href="#kiali" title="Permanent link">&
</li>
<li>
<p>Deploy Kiali:</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-18-1" name="__codelineno-18-1" href="#__codelineno-18-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.2/samples/addons/kiali.yaml
<div class="highlight"><pre><span></span><code><a id="__codelineno-18-1" name="__codelineno-18-1" href="#__codelineno-18-1"></a>kubectl<span class="w"> </span>apply<span class="w"> </span>-f<span class="w"> </span>istio-1.20.3/samples/addons/kiali.yaml
</code></pre></div>
</li>
<li>
Expand All @@ -815,6 +818,7 @@ <h2 id="kiali">Kiali<a class="headerlink" href="#kiali" title="Permanent link">&
</li>
</ol>
<p><img alt="Visualization of traffic flow in Kiali" src="../kiali-screenshot.png" /></p>
<p>Kiali also has <a href="https://kiali.io/docs/features/details/#spring-boot">integrations specific for JVM and Spring Boot applications</a>.</p>



Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit 9c21db7

Please sign in to comment.