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

Add HPAv2 tutorial #164

Merged
merged 2 commits into from
Aug 11, 2019
Merged

Add HPAv2 tutorial #164

merged 2 commits into from
Aug 11, 2019

Conversation

alexellis
Copy link
Member

Fixes: openfaas/faas-netes#483

Signed-off-by: Alex Ellis (OpenFaaS Ltd) [email protected]

Description

Add HPAv2 tutorial

Motivation and Context

  • I have raised an issue to propose this change (required)

Fixes: openfaas/faas-netes#483

How Has This Been Tested?

On an Intel NUC running Kubernetes v1.14.1 setup via kubeadm.

Details in the tutorial of what was done

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Fixes: openfaas/faas-netes#483

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
watch -n 5 "faas-cli list"
```

Here is ane example of the replicas scaling up in response to the traffic created by `hey`:
Copy link

Choose a reason for hiding this comment

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

ane->an

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Would you mind trying this out?

@alexellis
Copy link
Member Author

I think it would be useful to be able to set a memory or CPU request and limit via the CLI (without YAML).

@rgee0 or @martindekov please could you create a feature request in openfaas/cli?

@martindekov
Copy link
Contributor

I will open one in couple of hours if @rgee haven't done it already 😄

@martindekov
Copy link
Contributor

martindekov commented Aug 10, 2019

openfaas/faas-cli#670 here is the Issue, also gave my opinion on how this can be achieved 👍

kubectl scale -n openfaas deploy/alertmanager --replicas=0
```

### Configure Prometheus to scrape the Kubernetes API server
Copy link
Contributor

@stefanprodan stefanprodan Aug 11, 2019

Choose a reason for hiding this comment

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

This is not needed, metrics server collects it's own metrics.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will we need it for the custom metrics + adapter later?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, the prom adapter should target the OF Prometheus, no need to install a 2nd one.


> Note: you can view function usage using `-n openfaas-fn`, or core-service usage with `-n openfaas`

### Disable auto-scaling with OpenFaaS
Copy link
Contributor

Choose a reason for hiding this comment

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

This could be done at function level with com.openfaas.scale.factor=0

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes we could turn it off at a per function basis.

@alexellis
Copy link
Member Author

Thank you for the feedback Stefan

@alexellis
Copy link
Member Author

If you have time to write the extension for custom metrics you can merge it into my branch or we could do it at a later time.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
@alexellis alexellis merged commit dc69e97 into master Aug 11, 2019
@alexellis
Copy link
Member Author

@stefanprodan I've added your feedback for the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide detailed tutorial / documentation on HPAv2
4 participants