-
Notifications
You must be signed in to change notification settings - Fork 733
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
[Resource Quota Lecture] All objects must use either requests or limits #19
Comments
Here a possible solution: apiVersion: v1
kind: ResourceQuota
metadata:
name: compute-resources
spec:
hard:
limits.cpu: "400m"
---
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: tomcat-deployment
spec:
selector:
matchLabels:
app: tomcat
replicas: 3
template:
metadata:
labels:
app: tomcat
spec:
containers:
- name: tomcat
image: tomcat:9.0
ports:
- containerPort: 8080
resources:
limits: # Instead of "requests:"
cpu: "200m" |
@abdennour Thanks for the proposed solution, I have put up a PR, can you take a look? #21 |
Actually shall we put both |
@jleetutorial I think we should consider limits, requests or both. The dependency follows those formulas:
Hence, I will merge your PR |
Update tomcat-deployment.yaml closes #19
I have to open this one again. @jleetutorial Please FYA |
What happens during that lecture is we configure the limits.cpu in the Resourcequote. But don't configure it in the tomcat-deployment instead we configure the Cpu requests.
Which occurs in the error we receive. If you change limits.cpu to requests.cpu everything works just fine.
Related Question(s)
The text was updated successfully, but these errors were encountered: