I have created 2 replicas of pods using the deployment declarative method in kubernetes by using the following command
$ kubectl create -f app-deployment.yaml
It created 2 pods of my java web application in one of the node. I want to specify memory resources for those pods. I know that we can specify memory resources to the pods by running the below script.
apiVersion: v1
kind: Pod
metadata:
name: app1
spec:
containers:
- image: app:v1
name: app1
resources:
limits:
memory: 300Mi
requests:
memory: 200Mi
ports:
- containerPort: 8080
hostPort: 8082
When i run the above script, a new pod with the name app1 gets created with the memory specified.
But how do i specify the memory resources for the pods created using the deployment script which i ran initially ?
Any help on this would be appreciable.