简体   繁体   English

如何在 Anthos Metrics for Kubernetes 集群中获取数据

[英]How to get data in Anthos Metrics for Kubernetes clusters

We have one project and there are two clusters inside.我们有一个项目,里面有两个集群。 We would like to monitor and set alert policies for plenty of parameters like kube_pod_status_phase, kube_pod_container_status_restarts_total, etc. We are able to see all these parameters in Metric Explorer (with prefix kubernetes.io/anthos/..) but it doesn't show any data.我们想监控和设置大量参数的警报策略,例如 kube_pod_status_phase、kube_pod_container_status_restarts_total 等。我们可以在 Metric Explorer(前缀为 kubernetes.io/anthos/..)中看到所有这些参数,但它没有显示任何数据。 Can anyone please guide us if any other configurations are missing to use Anthos Metrics?如果缺少使用 Anthos Metrics 的任何其他配置,任何人都可以指导我们吗? Or if anyone can provide a guide or steps to use Anthos Metrics?或者是否有人可以提供使用 Anthos Metrics 的指南或步骤?

Note: We have Istio configured in both clusters and we are using Workload Identity feature as well.注意:我们在两个集群中都配置了 Istio,并且我们也在使用 Workload Identity 功能。

Any help would be highly appreciated.任何帮助将不胜感激。

Thank you.谢谢你。

I don't think you want to use this metrics.我认为您不想使用此指标。

Anthos, Anthos GKE and GKE are 3 different google products. Anthos、Anthos GKE 和 GKE是 3 种不同的谷歌产品。

GKE : GKE :

is an enterprise-grade platform for containerized applications, including stateful and stateless, AI and ML, Linux and Windows, complex and simple web apps, API, and backend services.是容器化应用程序的企业级平台,包括有状态和无状态、AI 和 ML、Linux 和 Windows、复杂和简单的 Web 应用程序、API 和后端服务。 Leverage industry-first features like four-way auto-scaling and no-stress management.利用行业首创的功能,例如四向自动缩放和无压力管理。 Optimize GPU and TPU provisioning, use integrated developer tools, and get multi-cluster support from SREs.优化 GPU 和 TPU 配置,使用集成开发人员工具,并从 SRE 获得多集群支持。

Anthos安托斯

is an open hybrid and multi-cloud application platform that enables you to modernize your existing applications, build new ones, and run them anywhere in a secure manner.是一个开放的混合和多云应用程序平台,使您能够对现有应用程序进行现代化改造,构建新应用程序,并以安全的方式在任何地方运行它们。 Built on open source technologies pioneered by Google—including Kubernetes, Istio, and Knative—Anthos enables consistency between on-premises and cloud environments and helps accelerate application development. Anthos 以 Google 首创的开源技术(包括 Kubernetes、Istio 和 Knative)为基础,可实现本地和云环境之间的一致性,并有助于加速应用程序开发。

Anthos GKE Anthos GKE

is part of Anthos, lets you take advantage of Kubernetes and cloud technology in your data center and in the cloud.是 Anthos 的一部分,可让您在数据中心和云中利用 Kubernetes 和云技术。 You get Google Kubernetes Engine (GKE) experience with quick, managed, and simple installs as well as upgrades validated by Google.您可以通过快速、托管和简单的安装以及经过 Google 验证的升级获得 Google Kubernetes Engine (GKE) 体验。 And Google Cloud Console gives you a single pane of glass view for managing your clusters across on-premises and cloud environments. Google Cloud Console 为您提供了一个单一的管理平台,用于跨本地和云环境管理集群。

If you will check information about Anthos GKE pricing you can read that:如果您要查看有关Anthos GKE定价的信息,您可以阅读:

Anthos is available as a monthly, term-based subscription service. Anthos 可作为基于期限的月度订阅服务提供。 Anthos subscription is required to use Anthos GKE.使用 Anthos GKE 需要订阅 Anthos。 For pricing please contact sales.如需定价,请联系销售。

So to get Anthos metrics , you would need to use Anthos GKE , which requires Anthos subscription .因此,要获得Anthos metrics ,您需要使用Anthos GKE ,这需要Anthos subscription It can produce more costs, for details you would probably need to contact sales.它可能会产生更多成本,有关详细信息,您可能需要联系销售人员。

For monitoring purposes you should check possibilities describedhere and choose what would fit you best.出于监控目的,您应该检查此处描述的可能性并选择最适合您的方式。

However, the most used ways are to use Prometheus on GKE and Stackdriver .但是,最常用的方法是在 GKEStackdriver 使用Prometheus

In addition, in the web you can find many HowTo regarding Monitoring on GKE like this tutorial .此外,您可以在网络上找到许多关于 GKE 监控的 HowTo,例如本教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM