Reputation: 63
I am facing the following issue related specifying namespace quota.
apiVersion: v1
kind: ResourceQuota
metadata:
name: namespacequota
namespace: {{ .Release.Namespace }}
spec:
hard:
requests.cpu: "3"
requests.memory: 10Gi
limits.cpu: "6"
limits.memory: 12Gi
Below command used for installation
helm install privachart3 . -n test-1
However the resourcequota is not getting created.
kubectl get resourcequota -n test-1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NAME CREATED AT
gke-resource-quotas 2021-01-20T06:14:16Z
kubectl apply -f namespacequota.yaml --namespace=test-1
The only change required in the file above is commenting of line number-5 that consist of release-name.
kubectl get resourcequota -n test-1
NAME CREATED AT
gke-resource-quotas 2021-01-20T06:14:16Z
namespacequota 2021-01-23T07:30:27Z
However in this case, when i am trying to install the chart, the PVC is created, but the POD is not getting created.
The capacity is not an issue as i am just trying to create a single maria-db pod using "Deployment".
Command used for install given below
helm install chart3 . -n test-1
Output observed given below
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NAME: chart3
LAST DEPLOYED: Sat Jan 23 08:38:50 2021
NAMESPACE: test-1
STATUS: deployed
REVISION: 1
TEST SUITE: None
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Upvotes: 0
Views: 870
Reputation: 63
I got the answer from another the Git forum. Upon setting a namespace quota we need to explicitly set the POD's resource. In my case i just needed to specify the resource limit under the image.
- image: wordpress:4.8-apache
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
Post that i am now able to observe the PODs as well
[george@dis ]$ kubectl get resourcequota -n geo-test
NAME AGE REQUEST LIMIT
gke-resource-quotas 31h count/ingresses.extensions: 0/100, count/ingresses.networking.k8s.io: 0/100, count/jobs.batch: 0/5k, pods: 2/1500, services: 2/500
namespace-quota 7s requests.cpu: 500m/1, requests.memory: 128Mi/1Gi limits.cpu: 1/3, limits.memory: 256Mi/3Gi
[george@dis ]$
.
[george@dis ]$ kubectl get pod -n geo-test
NAME READY STATUS RESTARTS AGE
wordpress-7687695f98-w7m5b 1/1 Running 0 32s
wordpress-mysql-7ff55f869d-2w6zs 1/1 Running 0 32s
[george@dis ]$
Upvotes: 1