-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add HPAv2 tutorial #164
Conversation
Fixes: openfaas/faas-netes#483 Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
docs/tutorials/kubernetes-hpa.md
Outdated
watch -n 5 "faas-cli list" | ||
``` | ||
|
||
Here is ane example of the replicas scaling up in response to the traffic created by `hey`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ane->an
There was a problem hiding this comment.
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?
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? |
I will open one in couple of hours if @rgee haven't done it already 😄 |
openfaas/faas-cli#670 here is the Issue, also gave my opinion on how this can be achieved 👍 |
docs/tutorials/kubernetes-hpa.md
Outdated
kubectl scale -n openfaas deploy/alertmanager --replicas=0 | ||
``` | ||
|
||
### Configure Prometheus to scrape the Kubernetes API server |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Thank you for the feedback Stefan |
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. |
1b480fd
to
19f7001
Compare
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
19f7001
to
64d1f7c
Compare
@stefanprodan I've added your feedback for the tutorial. |
Fixes: openfaas/faas-netes#483
Signed-off-by: Alex Ellis (OpenFaaS Ltd) [email protected]
Description
Add HPAv2 tutorial
Motivation and Context
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