由于公司业务原因,需要的pod比较多,从0到300花费时间太长,所以给柯达增加时间段伸缩功能,晚上的0-100之间伸缩,白天在100-300之间伸缩
示例:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: {scaled-object-name} # ScaledObject 对象的名称
annotations:
minReplicaCountStart:"07:00" # 可选。代表minReplicaCount的开始时间
minReplicaCountEnd: "19:00" # 可选。代表minReplicaCount的结束时间
minReplicaCountStr: "100" # 可选。代表minReplicaCount的值,注,上面三个值都设置才生效
spec:
scaleTargetRef:
其他内容略
Kubernetes-based Event Driven Autoscaling
KEDA allows for fine-grained autoscaling (including to/from zero) for event driven Kubernetes workloads. KEDA serves as a Kubernetes Metrics Server and allows users to define autoscaling rules using a dedicated Kubernetes custom resource definition.
KEDA can run on both the cloud and the edge, integrates natively with Kubernetes components such as the Horizontal Pod Autoscaler, and has no external dependencies.
We are a Cloud Native Computing Foundation (CNCF) graduated project.
Table of contents
- 示例:
- Getting started
- Documentation
- Community
- Adopters - Become a listed KEDA user!
- Governance & Policies
- Support
- Roadmap
- Releases
- Contributing
- QuickStart - RabbitMQ and Go
- QuickStart - Azure Functions and Queues
- QuickStart - Azure Functions and Kafka on Openshift 4
- QuickStart - Azure Storage Queue with ScaledJob
You can find several samples for various event sources here.
There are many ways to deploy KEDA including Helm, Operator Hub and YAML files.
Interested to learn more? Head over to keda.sh.
If interested in contributing or participating in the direction of KEDA, you can join our community meetings! Learn more about them on our website.
Just want to learn or chat about KEDA? Feel free to join the conversation in #KEDA on the Kubernetes Slack!
We are always happy to list users who run KEDA in production, learn more about it here.
You can learn about the governance of KEDA here.
Details on the KEDA support policy can found here.
We use GitHub issues to build our backlog, a complete overview of all open items and our planning.
Learn more about our roadmap here.
You can find the latest releases here.
You can find contributing guide here.
Learn how to build & deploy KEDA locally here.
Learn more about our testing strategy here.