-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14259 from newrelic/k8s-intro-changes
k8s tutorial
- Loading branch information
Showing
17 changed files
with
555 additions
and
76 deletions.
There are no files selected for viewing
209 changes: 135 additions & 74 deletions
209
...ubernetes-integration/installation/kubernetes-integration-install-configure.mdx
Large diffs are not rendered by default.
Oops, something went wrong.
143 changes: 143 additions & 0 deletions
143
src/content/docs/tutorial-kubernetes-learn/tutorial-k8s-intro.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
--- | ||
title: Understand your Kubernetes system with New Relic | ||
--- | ||
|
||
import tutorialNavigator from 'images/kubernetes_screenshot-full_navigator-main.webp' | ||
|
||
import tutorialInstall from 'images/kubernetes_screenshot-full_guidedInstall.webp' | ||
|
||
import k8sNavigatorAnimation from 'images/kubernetes_screenshot-full_navigator-animated.gif' | ||
|
||
import apmApmCompleteSummaryPage from 'images/apm_screenshot-full_apm-complete-summary-page-.webp' | ||
|
||
import infraComplete from 'images/infrastructure_screenshot-full_infra-main.webp' | ||
|
||
|
||
A Kubernetes system is inherently complex and has a reputation as challenging to grasp. Understanding Kubernetes as a concept is a complex task by itself and wanting to understand an specific Kubernetes system only adds more complextiy. How do you troubleshoot ephemeral containers that spin up and down before you can even access them? How do you understand the health of your system as a whole if you have hundreds of containers orchestrated at a time? How do you parse out the intricate systems into functional layers? | ||
|
||
In this tutorial series, you will learn how to monitor your Kubernetes system with New Relic and how it can streamline your understanding of the Kubernetes as a whole. | ||
|
||
<img | ||
title="New Relic navigator" | ||
alt="A screenshot showing the New Relic navigator for Kubernetes. It shows indivudual pods, their health, and operational groups." | ||
src={tutorialNavigator} | ||
/> | ||
|
||
<p></p> | ||
<p></p> | ||
|
||
## Set up New Relic: | ||
|
||
To begin, you need to set up New Relic with your Kubernetes system. The steps below guide you though the process: | ||
|
||
<Steps> | ||
<Step> | ||
|
||
### Install New Relic agent: | ||
|
||
<img | ||
title="New Relic guided install" | ||
alt="A screenshot showing guided install flow for Kubernetes in the New Relic UI." | ||
src={tutorialInstall} | ||
/> | ||
|
||
The New Relic Kubernetes integration gives you full observability into the health and performance of your environment. With the data it provides, you can monitor the health of your entire Kubernetes cluster or drill down to a single pod. This agent collects telemetry data from your cluster using several New Relic integrations such as the Kubernetes events integration, the Prometheus Agent, and the New Relic Logs Kubernetes plugin. | ||
|
||
There are various ways to integrate your Kubernetes system. For this tutorial series, we highly recommend using the guided install steps below. For other install paths, see [our Kubernetes install docs](/docs/kubernetes-pixie/kubernetes-integration/installation/kubernetes-integration-install-configure/). | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th style={{ width: "200px" }}> | ||
Guided install option | ||
</th> | ||
<th> | ||
Description | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td> | ||
[Guided install](https://one.newrelic.com/nr1-core?account=2498654&state=d1aae74b-0ad6-b0f3-093d-cc89ecf89234) | ||
</td> | ||
<td> | ||
Use this if your New Relic organization does **not** use the [EU](/docs/using-new-relic/welcome-new-relic/get-started/our-eu-us-region-data-centers) data center, and you don't need the bonus dashboards and alerts from the quickstart. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
[Guided install (EU)](https://one.eu.newrelic.com/nr1-core?account=2498654&state=d1aae74b-0ad6-b0f3-093d-cc89ecf89234) | ||
</td> | ||
<td> | ||
Use this if your New Relic organization uses the [EU](/docs/using-new-relic/welcome-new-relic/get-started/our-eu-us-region-data-centers) data center, and you don't need the bonus dashboards and alerts from the quickstart. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
[Guided install with quickstart](https://one.newrelic.com/launcher/catalog-pack-details.launcher/?pane=eyJuZXJkbGV0SWQiOiJjYXRhbG9nLXBhY2stZGV0YWlscy5jYXRhbG9nLXBhY2stY29udGVudHMiLCJxdWlja3N0YXJ0SWQiOiI4OGE3OWY1Mi04MWMxLTRmYTItOTlmOC0zY2I1YjAxMmYxNjAifQ==) | ||
</td> | ||
<td> | ||
Use this option if your New Relic organization does **not** use the [EU](/docs/using-new-relic/welcome-new-relic/get-started/our-eu-us-region-data-centers) data center, and you also want to install some bonus dashboards and alerts from the quickstart. | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
</Step> | ||
|
||
<Callout variant="tip"> | ||
Additionally, you can start monitoring Kubernetes clusters using our Auto-telemetry with Pixie. [Learn more about Auto-telemetry with Pixie here](/docs/kubernetes-pixie/auto-telemetry-pixie/get-started-auto-telemetry-pixie/). | ||
</Callout> | ||
|
||
<Step> | ||
### Send data from your applications | ||
|
||
Kubernetes excels at abstracting the toil one runs into when managing containerized workloads. That abstraction adds complexity when correlating individual applications to their underlying infrastructure. To reduce this complexity, you can report data from your applications and services to New Relic and directly correlate them to their place within the Kubernetes cluster. | ||
|
||
<img | ||
title="apm summary page" | ||
alt="A screenshot depicting the APM summary page." | ||
src={apmApmCompleteSummaryPage} | ||
/> | ||
|
||
[Follow the instruction in this document](/docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/link-apm-applications-kubernetes/) to correlate data from applications in your pods to the cluster. You will use our application performance monitoring (APM) capabilities to scrape your applications for performance data and send them to New Relic. | ||
</Step> | ||
|
||
<Step> | ||
### Send data from your services | ||
|
||
Correlating services such as Cassandra and MySQL with your Kubernetes data requires configuration similar to how you reported application data. | ||
|
||
|
||
<img | ||
title="New Relic infra page" | ||
alt="A screenshot showing the New Relic infrastructure monitoring UI." | ||
src={infraComplete} | ||
/> | ||
|
||
To correlate your data, see our doc on [monitoring services in Kubernetes](/docs/kubernetes-pixie/kubernetes-integration/advanced-configuration/monitor-services/monitor-services-running-kubernetes/). This process will use our on-host integrations for various supported services using a Helm Chart. | ||
|
||
</Step> | ||
<Step> | ||
### Explore your data | ||
|
||
<img | ||
width="100%;" | ||
title="New Relic - Kubernetes Navigator entity details" | ||
alt="New Relic - Kubernetes Navigator entity details" | ||
src={k8sNavigatorAnimation} | ||
/> | ||
|
||
To confirm you're sending all your Kubernetes related data to New Relic, explore the Kubernetes charts. Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Kubernetes**. Poke around your data and see if you can get a general sense of the health of your Kubernetes system.Confirm you're seeing data for your entire cluster, individual pods, and any services and applications you expect. Once you're ready, proceed to the next steps. | ||
|
||
|
||
</Step> | ||
</Steps> | ||
## Next steps | ||
|
||
You're now sending Kubernetes data to New Relic! From here you can start using the power of New Relic to gauge the health of your system and understand how it's all working together by following the rest of this tutorial series. Each doc will dive into how New Relic can help monitor and understand an individual layer of Kubernetes. | ||
|
||
<UserJourneyControls | ||
nextStep={{path: "/docs/tutorial-kubernetes-learn/tutorial-k8s-layers", title: "Next step", body: "Learn about Kubernetes clusters and how to monitor them."}} | ||
/> |
133 changes: 133 additions & 0 deletions
133
src/content/docs/tutorial-kubernetes-learn/tutorial-k8s-layers.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
--- | ||
title: Understand and monitor Kubernetes clusters | ||
--- | ||
|
||
import k8sDiagramContext from 'images/tutorials_diagram_kubernetes-overview.webp' | ||
|
||
import tutorialOverviewdashboard from 'images/tutorial_screenshot-full_overview-dashboard.webp' | ||
|
||
import tutorialOverviewDeployments from 'images/tutorial_screenshot-full_overview-deployments.webp' | ||
|
||
import tutorialOverviewFailed from 'images/tutorial_screenshot-crop_failed-pods.webp' | ||
|
||
import tutorialAPMOverview from 'images/tutorial_screenshot-full_apmK8s.webp' | ||
|
||
import tutorialAPMPerformance from 'images/tutorial_screenshot-full_apm-k8s-performance.webp' | ||
|
||
Let's review what makes up a Kubernetes system and explore how New Relic can help you understand your system at a cluster-wide level. | ||
|
||
## Break it apart to understand | ||
|
||
Let's break a Kubernetes system into distinct layers first. | ||
|
||
<img | ||
title="k8sDiagramContext" | ||
alt="an image showing an abstracted view of a kubernetes system. This includes pods, apps, and clusters" | ||
src={k8sDiagramContext} | ||
/> | ||
|
||
We'll discuss a Kubernetes system in three key sections. | ||
|
||
* **The cluster**: this represents the entire Kubernetes system. The cluster contains multiple deployments, which in turn house many pods. Each pod contains its individual services and applications. | ||
|
||
* **The orchestrated**: these are the core elements of a Kubernetes system. Orchestrated components consist of entire deployments that spin pods up and down as needed. | ||
|
||
* **The services and applications**: services and applications are the workhorses of the Kubernetes system. Within a Kubernetes system each pod houses one or more services and applications. The services and applications provide the essential functionality that drives the system. This could be computation, a web app, or any other application. | ||
|
||
It's important to note that these sections nest within each other. The cluster contains multiple orchestrated layers, and each orchestrated layer consists of multiple service and application layers. | ||
|
||
<Callout variant="important"> | ||
There are many ways you can split up a Kubernetes system to understand it; these layers are just one way to think of your system. | ||
</Callout> | ||
|
||
## Understand and monitor the cluster layer | ||
|
||
In a large Kubernetes system, with numerous deployments and pods, manually monitoring each component becomes impractical. You might be dealing with dozens or hundred of deployments, which in turn means you might have to monitor hundreds or thousands of individual pods. New Relic offers a more efficient approach to oversee the entire system's health and receive timely alerts when issues arise. | ||
|
||
The following steps guide your through a general monitoring strategy for your cluster: | ||
|
||
<Steps> | ||
<Step> | ||
### Go to the Kubernetes overview dashboard | ||
|
||
Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Kubernetes > Overview Dashboard**. Be sure to scroll down to see all the graphs available to you. | ||
|
||
If you don't see any data, [make sure you set up your monitoring ](/docs/tutorial-kubernetes-learn/tutorial-k8s-intro/#install-new-relic-agent) in the previous tutorial. | ||
</Step> | ||
<Step> | ||
|
||
### Triage your cluster | ||
|
||
The Kubernetes overview dashboard shows your high level data about your cluster. You can find general data such as the count of pods and services, but more importantly you can find data about the health of your cluster such as the percent of pods running, the count of failed pods, the number of container restarts, and more. | ||
<img | ||
title="tutorialOverviewdashboard" | ||
alt="The main overview dashboard for the kubernetes capability" | ||
src={tutorialOverviewdashboard} | ||
/> | ||
|
||
|
||
|
||
Use this dashboard to gauge the general health of your cluster. Here are a few things to look for: | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th> | ||
Component | ||
</th> | ||
<th> | ||
What it indicates | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td> | ||
Red or yellow tiles | ||
</td> | ||
<td> | ||
Yellow tiles are warnings. Keep an eye on what they refer to. For example, if you have 2 unhealthy deployments you should take note and plan to troubleshoot those deployments. | ||
|
||
Red tiles are critical alerts. These aren't necessarily failures in your system, but you should prioritize addressing them as immediately as possible. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
Anomalous spikes in graphs | ||
</td> | ||
<td> | ||
there are various graphs that show things such as pending pods over time or even memory utilization over time. | ||
|
||
Spike are fairly normal, such as the spikes in the **Kubernetes Warning Events by Reason** graph in the screenshot above. These spikes happen regularly about every 5 minutes so they are no cause for concern. Look for spikes that happen outside of regular patterns or spike in a much larger magnitude than normal. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
Node readiness | ||
</td> | ||
<td> | ||
Observe whether nodes in the cluster are ready and able to host pods. Ensure that your cluster's infrastructure is prepared to handle workloads without any bottlenecks. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
Resource count insights | ||
</td> | ||
<td> | ||
Keep a close eye on the number of pods, containers, nodes, or other Kubernetes resources within the cluster. While you won't always find something actionable, monitoring resource utilization allows you to plan for future scaling. | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
Use the time selector in the top left of the page to see your data across time ranges to verify any troubling data isn't just random or to triage across a longer timeframe. | ||
|
||
</Step> | ||
</Steps> | ||
|
||
|
||
|
||
<UserJourneyControls | ||
nextStep={{path: "/docs/tutorial-kubernetes-learn/tutorial-k8s-orchestrated", title: "Next step", body: "Monitor Kubernetes deployments and pods."}} | ||
previousStep={{path: "/docs/tutorial-kubernetes-learn/tutorial-k8s-intro", title: "Previous step", body: "Learn about Kubernetes monitoring."}} | ||
/> |
61 changes: 61 additions & 0 deletions
61
src/content/docs/tutorial-kubernetes-learn/tutorial-k8s-orchestrated.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
title: Understand and monitor the Kubernetes orchestrated layer | ||
--- | ||
|
||
import tutorialOverviewdashboard from 'images/tutorial_screenshot-full_overview-dashboard.webp' | ||
|
||
import tutorialOverviewFailed from 'images/tutorial_screenshot-crop_failed-pods.webp' | ||
|
||
Orchestrated components consist of entire deployments that spin pods up and down as needed. In a Kubernetes system, individual deployments have specific configurations. For example, a deployment might run four instances of an application in individual containers. The deployment will spin up pods containing that application until it meets that quota. If a pod were to fail, it would spin up a new one to continue to meet the specified number. | ||
|
||
Issues arise when deployments you have dozens or hundreds of deployments, each with configurations you might not even remember. | ||
|
||
The following steps guide you through a general strategy to monitor your deployments: | ||
|
||
<Steps> | ||
<Step> | ||
|
||
### Navigate to the overview dashboard | ||
|
||
Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Kubernetes > Overview Dashboard**. | ||
</Step> | ||
<Step> | ||
|
||
### Triage your deployments | ||
|
||
Take a look at the unhealthy deployment tile and the deployment count tile. | ||
|
||
Compare the two to measure the percentage of unhealthy deployments in your cluster. Unhealthy deployments have missing or unavailable pods. This usually means that the deployment was unable to spin up those pods. | ||
|
||
Let's take a close look. | ||
|
||
<img | ||
title="tutorialOverviewdashboard" | ||
alt="The main overview dashboard for the kubernetes capability" | ||
src={tutorialOverviewDeployments} | ||
/> | ||
|
||
</Step> | ||
<Step> | ||
|
||
### Identify pending and failed pods | ||
|
||
Scroll down a bit and find the **Pending and Failed Pods** table. This table will show you all the pods that have failed or are stuck pending for whatever reason. It's normal that pods fail at to a certain degree depending on the baseline health of your system. | ||
|
||
What you're looking for is pods that repeatedly fail. Scroll down the chart as needed. | ||
|
||
<img | ||
title="tutorialOverviewFailed" | ||
alt="The main overview dashboard for the kubernetes capability focusing on the failed pods section" | ||
src={tutorialOverviewFailed} | ||
/> | ||
|
||
Once you've identified which pods fail regularly, troubleshoot the deployment configs for those pods. | ||
|
||
</Step> | ||
</Steps> | ||
|
||
<UserJourneyControls | ||
nextStep={{path: "/docs/tutorial-kubernetes-learn/tutorial-k8s-services", title: "Next step", body: "Monitor Kubernetes services and applications."}} | ||
previousStep={{path: "/docs/tutorial-kubernetes-learn/tutorial-k8s-layers", title: "Previous step", body: "Monitor Kubernetes clusters."}} | ||
/> |
Oops, something went wrong.