简体   繁体   English

单节点kubernetes集群扩展

[英]Single node kubernetes cluster scale up

I have single node kubenertes cluster running on GKE. 我有在GKE上运行的单节点kubenertes集群。 All the load is running on single node separated by namesapces. 所有负载都在由名称空间分隔的单个节点上运行。

now i would like to implement the auto-scaling. 现在我想实现自动缩放。 Is it possible i can scale mircoservices to new node but one pod is running My main node only. 是否可以将mircoservices扩展到新节点,但一个Pod仅在运行我的主节点。

what i am thinking 我在想什么

Main node : Running everything with 1 pod avaibility (Redis, Elasticsearch) 主节点:运行具有1个Pod可用性的所有节点(Redis,Elasticsearch)

Scaled up node : Scaled up replicas only of stateless microservice 放大节点:仅放大无状态微服务的副本

so is there any way i can implemet this using node auto scaeler or using affinity . 所以我有什么方法可以使用node auto scaeler或使用affinity来实现这一点。

Issue is that right now i am running graylog, elasticsearch and redis and rabbitmq on single node having statefulsets and backed by volume i have to redeploy everything edit yaml file for adding affinity to all. 问题是,现在我要在具有statefulsets并受卷支持的单个节点上运行graylog,elasticsearch和redis和Rabbitmq,我必须重新部署所有可编辑yaml文件以增加affinity所有人的affinity

I'm not sure that I understand your question correctly but if I do then you may try to use taints and tolerations (node affinity). 我不确定我是否正确理解了您的问题,但是如果我这样理解,那么您可能会尝试使用污点和公差(节点相似性)。 Taints and tolerations work together to ensure that pods are not scheduled onto inappropriate nodes. 污渍和容忍度共同作用,以确保未将豆荚安排在不适当的节点上。 All the details are available in the documentation here . 所有详细信息都可在此处的文档中找到

Assuming the issue you have is that the persistent volumes bound to your StatefulSets are only accessible from one node, then you can use the nodeAffinity field to constraint where the StatefulSet Pods can be scheduled. 假设您遇到的问题是绑定到StatefulSet的持久卷只能从一个节点访问,那么您可以使用nodeAffinity字段来约束可以调度StatefulSet Pod的位置。 As mentioned in the documentation: 如文档中所述:

A PV can specify node affinity to define constraints that limit what nodes this volume can be accessed from. PV可以指定节点亲和力来定义约束,以限制可以访问此卷的节点。 Pods that use a PV will only be scheduled to nodes that are selected by the node affinity. 使用PV的Pod仅会安排到由节点亲缘关系选择的节点上。

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

相关问题 单个 GKE Kubernetes 节点集群 - single GKE kubernetes node cluster Pod 在单节点 Kubernetes 集群上处于 Pending 状态 - Pod is in Pending state on single node Kubernetes cluster Windows Server Core单个节点群集上的Kubernetes - Kubernetes on single Windows Server Core node cluster 单节点kubernetes集群上的HPA实现 - HPA Implementation on single node kubernetes cluster 副本会减少单节点 kubernetes 集群上的流量吗? - do replicas decrease traffic on a single node kubernetes cluster? 如何在Google Container Engine / Kubernetes上扩展我的群集? - How do I scale up my cluster on Google Container Engine / Kubernetes? kubernetes 集群添加 windows 节点 - kubernetes cluster adding windows node 单节点 Kubernetes 集群 - 不同 pod 中的容器无法相互通信 - Single node Kubernetes cluster - Containers in different pods can't communicate with each other 如何在 Kubernetes 集群中扩展 Wordpress - 使用多个 pod 副本, - 访问单个 PVC(持久性文件存储) - How can you scale Wordpress in Kubernetes cluster - using multiple pod replicas, - accessing a single PVC (persistent file storage) 由于java.net.UnknownHostException,单节点kubernetes集群上的spark-examples作业失败:kubernetes.default.svc - spark-examples job failed on single node kubernetes cluster due to java.net.UnknownHostException: kubernetes.default.svc
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM