我正在移植一个应用程序以在 k8s 中运行。我遇到了 ingress 问题。我正在尝试找到一种方法来限制在任何给定时间向部署管理的每个后端 Pod 发出的 REST API 请求数量。
请参阅下图所示的架构。
Ingress 由 nginx-ingress 管理。对于给定的一组 URL 路径,入口将请求转发到以 REST API 后端进程部署为目标的服务。部署还由 HPA 根据 CPU 负载进行管理。
我想要做的是找到一种方法对入口请求进行排队,这样运行我们的 API 后端进程的任何 pod 中的请求永远不会超过 X 个。(例如,每个 Pod 一次只允许 50 个请求)
有谁知道如何像这样设置请求限制?
作为一个额外的问题,我需要做的下一件事是让 HPA 监视请求排队并自动扩展/缩小部署,以将 Pod 数量与当前正在处理/排队的请求数量相匹配。例如,如果每个 Pod 可以同时处理 100 个正在运行的请求,而我们当前要处理的负载级别为 1000 个请求,则自动缩放到 10 个 Pod。
如果有用的话,我还计划为这个集群安装 linkerd。也许它有一种可以提供帮助的能力。
我已经在我的 linux ubuntu 上克隆了链接器(https://github.com/linkerd)repo,并安装了 protoc,版本 2.5。当我尝试使用以下命令编译链接器时,出现错误“无法识别的语法标识符“proto3”。此解析器仅识别“proto2”。
命令: ./sbt linkerd/compile
当我尝试运行以下命令时,我在我的ubuntu机器上安装了kubernetes我将external-IP视为"pending",其中svc.yml是linkerd中的服务对象,链接如下
为什么我Linkerd 2.x在 GKE 的私有集群上安装时会出现以下错误?
Error: could not get apiVersions from Kubernetes: unable to retrieve the complete list of server APIs: tap.linkerd.io/v1alpha1: the server is currently unable to handle the request
Run Code Online (Sandbox Code Playgroud) Argo CD 显示 linkerd(由 Helm 安装)中的两个项目不同步。preserveUnknownFields: false这些警告是由该部分中的可选选项引起的spec:
Trafficsplits.split.smi-spec.io

serviceprofiles.linkerd.io
但我无法弄清楚如何忽略清单ignoreDifferences中使用的差异Application。json路径/spec/preserveUnknownFields不起作用。是因为左侧版本中不存在字段preserveUnknownFields吗?
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: linkerd
namespace: argocd
spec:
destination:
namespace: linkerd
server: https://kubernetes.default.svc
project: default
source:
chart: linkerd2
repoURL: https://helm.linkerd.io/stable
targetRevision: 2.10.1
syncPolicy:
automated: {}
ignoreDifferences:
- group: apiextensions.k8s.io/v1
name: trafficsplits.split.smi-spec.io
kind: CustomResourceDefinition
jsonPointers:
- /spec/preserveUnknownFields
- group: apiextensions.k8s.io/v1
name: trafficsplits.split.smi-spec.io
kind: CustomResourceDefinition
jsonPointers:
- /spec/preserveUnknownFields
Run Code Online (Sandbox Code Playgroud) Docker Swarm 模式路由网格是 linkerd 路由网格的内置替代品吗?换句话说,如果有开箱即用的解决方案,还有理由研究 linkerd 吗?
这是资源状态:
kind: Namespace
api
Version: v1
metadata:
name: linkerd
selfLink: /api/v1/namespaces/linkerd
uid: e7337b2b-bddb-4344-a986-d450973bc8cf
resourceVersion: '5540346'
creationTimestamp: '2020-05-10T13:49:21Z'
deletionTimestamp: '2020-06-03T20:16:30Z'
labels:
config.linkerd.io/admission-webhooks: disabled
linkerd.io/is-control-plane: 'true'
spec:
finalizers:
- kubernetes
status:
phase: Terminating
conditions:
- type: NamespaceDeletionDiscoveryFailure
status: 'True'
lastTransitionTime: '2020-06-03T20:16:44Z'
reason: DiscoveryFailed
message: >-
Discovery failed for some groups, 1 failing: unable to retrieve the
complete list of server APIs: tap.linkerd.io/v1alpha1: the server is
currently unable to handle the request
- type: NamespaceDeletionGroupVersionParsingFailure
status: 'False'
lastTransitionTime: '2020-06-03T20:16:38Z'
reason: ParsedGroupVersions
message: All …Run Code Online (Sandbox Code Playgroud) digital-ocean kubernetes kubectl linkerd kubernetes-namespace
我似乎无法找到我的问题的简单答案,
使用helm安装软件包时如何使用linkerd注入命令/选项添加,例如postgres?
我已经使用另一个包完成了此操作,但这是通过将注释命令添加到值文件中并在运行 helm install 命令时提供该命令来完成的。
使用istio,我所要做的就是在命名空间上添加一个标签,它就可以工作了吗?
因此,我开始考虑使用以下kubectl create namespace命令将注释添加到我正在使用的命名空间中:
但是,除非我使用文件,否则我似乎无法找到在创建名称空间时添加任何注释的方法。
那么,我要么需要一种方法来使用 create 命令将此注释添加到命名空间,要么在使用 helm 安装包时?
谢谢,
linkerd ×8
kubernetes ×6
argocd ×1
docker ×1
hpa ×1
jsonpath ×1
jsonpointer ×1
kubectl ×1
protoc ×1
ubuntu ×1