Skip to content

K8S solution notes

joveli edited this page Jun 27, 2019 · 3 revisions

适用于物理机部署 Kubernetes 的负载均衡器

Porter

Porter是一款适用于物理机部署 Kubernetes 的负载均衡器,该负载均衡器使用物理交换机实现,利用 BGP 和 ECMP 从而达到性能最优和高可用性。我们知道在云上部署的 Kubernetes 环境下,通常云服务厂商会提供 cloud LB 插件暴露 Kubernetes 服务到外网,但在物理机部署环境下由于没有云环境,服务暴露给外网非常不方便,Porter 是一个提供用户在物理环境暴露服务和在云上暴露服务一致性体验的插件。该插件提供两大功能模块:

  1. LB controller 和 agent: controller 负责同步 BGP 路由到物理交换机;agent 以 DaemonSet 方式部署到节点上负责维护引流规则;
  2. EIP service,包括 EIP pool 管理和 EIP controller,controller 会负责更新服务的 EIP 信息。 Porter 是 KubeSphere 的一个子项目。

k8s运维工具

kuberhealthy

kuberhealthy Easy synthetic testing for Kubernetes clusters. Supplements other solutions like Prometheus nicely.

What is Kuberhealthy?

Kuberhealthy performs synthetic tests from within Kubernetes clusters in order to catch issues that would otherwise go unnoticed. Instead of trying to identify all the things that could potentially go wrong, Kuberhealthy replicates real workflow and watches carefully for the expected Kubernetes behavior to occur. Kuberhealthy serves both a JSON status page and a Prometheus metrics endpoint for integration into your choice of alerting solution. More checks will be added in future versions to better cover service provisioning, DNS resolution, disk provisioning, and more.

Some examples of errors Kuberhealthy has detected in production:

  • Nodes where new pods get stuck in Terminating due to CNI communication failures
  • Nodes where new pods get stuck in ContainerCreating due to disk provisoning errors
  • Nodes where new pods get stuck in Pending due to container runtime errors
  • Nodes where Docker or Kubelet crashes or has restarted
  • Nodes that are unable to properly communicate with the api server due to kube-api request limiting
  • Nodes that cannot provision or terminate pods quickly enough due to high I/O wait
  • A pod in the kube-system namespace that is restarting too quickly
  • A Kubernetes component that is in a non-ready state
  • Intermittent failures to access or create custom resources
  • Kubernetes system services remaining technically "healthy" while their underlying pods are crashing too much
    • kube-scheduler
    • kube-apiserver
    • kube-dns

Clone this wiki locally