22 Aralık 2022 Perşembe

Kubernetes kind: ResourceQuota - Namespace için ResourceQuota Tanımlar

Örnek
Açıklaması şöyle
Below is an example Kubernetes Manifest that you can use to create a ResourceQuota in a Namespace. The Namespace in this example is called golangapp.

When setting up Resource Quotas in a Namespace, remember that there should be a fair amount of architecture design and decision-making around the process because Pods won’t deploy if the Quota has been met. For example, if you limit the memory to 512Mi, but you try to give a Pod 2GB of memory, there will be an error that looks similar to the below.

Error from server (Forbidden):
  error when creating "name_of_manifest.yaml": pods
"app name" is forbidden:
  exceeded quota: memorylimit
Şöyle yaparız
apiVersion: v1
kind: ResourceQuota
metadata:
  name: memorylimit
  namespace: golangapp
spec:
  hard:
    requests.memory: 512Mi
    limits.memory: 512Mi


Hiç yorum yok:

Yorum Gönder

Kubernetes kind: Cluster

Örnek Şöyle yaparız apiVersion: cluster.k8s.io/v1alpha1 kind: Cluster metadata: name: my-cluster spec: autoscaler: enabled: true ...