Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Autoscaling] Enable scale subresource on eligible resources #4599

Merged
merged 7 commits into from
Jul 8, 2021

Conversation

barkbay
Copy link
Contributor

@barkbay barkbay commented Jun 29, 2021

This PR enables scale subresource on the following resources:

  • ApmServer
  • Kibana
  • EnterpriseSearch
  • ElasticMapsServer

If you want to give it a try:

  • Update the CRDs with the ones provided by this PR
  • Deploy the following resources:
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch-sample
spec:
  version: 7.13.1
  nodeSets:
    - name: default
      count: 1
      config:
        node.store.allow_mmap: false
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: kibana-sample
spec:
  version: 7.13.1
  count: 1
  elasticsearchRef:
    name: "elasticsearch-sample"
  podTemplate:
    spec:
      containers:
        - name: kibana
          resources:
            requests:
              memory: 1Gi
              cpu: 1
            limits:
              memory: 1Gi
---
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
  name: kb
spec:
  scaleTargetRef:
    apiVersion: kibana.k8s.elastic.co/v1
    kind: Kibana
    name: kibana-sample
  minReplicas: 1
  maxReplicas: 4
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 50
  • Stress the CPU by running the following command in the Kibana Pod: sha1sum /dev/zero

The deployment should scale up automatically after a few seconds.

Fix #4547

@barkbay barkbay added >feature Adds or discusses adding a feature to the product v1.7.0 labels Jun 29, 2021
@barkbay
Copy link
Contributor Author

barkbay commented Jun 30, 2021

jenkins test this please

1 similar comment
@barkbay
Copy link
Contributor Author

barkbay commented Jul 1, 2021

jenkins test this please

Copy link
Collaborator

@pebrc pebrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I did a simple test with Enterprise Search 👍

test/e2e/test/checks.go Outdated Show resolved Hide resolved
@pebrc
Copy link
Collaborator

pebrc commented Jul 1, 2021

One more thought: should we mention this new capability in the documentation?

@barkbay
Copy link
Contributor Author

barkbay commented Jul 5, 2021

One more thought: should we mention this new capability in the documentation?

👍 , just opened #4608, I'll take care of it for 1.7.0

@barkbay barkbay force-pushed the scale-subresource branch from cdfaee0 to 63318af Compare July 8, 2021 13:46
@barkbay barkbay merged commit 7c39ff0 into elastic:master Jul 8, 2021
@barkbay barkbay changed the title Enable scale subresource on eligible resources [Autoscaling] Enable scale subresource on eligible resources Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autoscaling >feature Adds or discusses adding a feature to the product v1.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable scale subresource
2 participants