How to remove LimitRange from default namespace in kubernetes?

12/13/2018

For one of requirements , i created a new pod on my default name space using below yaml file

 apiVersion: v1
 kind: LimitRange
 metadata:
 name: mem-min-max-demo-lr1
 spec:
 limits:
 - max:
  memory: 5Gi
 min:
  memory: 900Mi
 type: Container

Now i need to remove these LimitRange from default namespace in kubernetes?

-- Margaret real
autoscaling
kubectl
kubernetes
kubernetes-pod

1 Answer

12/14/2018

You created a LimitRange named mem-min-max-demo-lr1 in the default namespace. To verify run kubectl get LimitRange -n default , then delete kubectl delete LimitRange mem-min-max-demo-lr1 . To further understand this scenario please check this https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/

-- iamejboy
Source: StackOverflow