Merge pull request #1 from LuckySB/res_reduce

reduce resource usage
This commit is contained in:
Slurm
2021-09-27 21:28:59 +05:00
committed by GitHub
19 changed files with 26 additions and 26 deletions
@@ -41,8 +41,8 @@ spec:
cpu: 1000m
memory: 1024Mi
requests:
cpu: 250m
memory: 512Mi
cpu: 10m
memory: 256Mi
livenessProbe:
exec:
command: ["rabbitmqctl", "status"]
@@ -89,4 +89,4 @@ spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi
storage: 20Mi
@@ -21,7 +21,7 @@ spec:
- containerPort: 80
resources:
requests:
cpu: 100m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
@@ -5,7 +5,7 @@
Для этого выполним команду:
```bash
kubectl apply -f ~/slurm/practice/3.saving-configurations/1.env/deployment-with-env.yaml
kubectl apply -f ~/slurm/practice/4.saving-configurations/1.env/deployment-with-env.yaml
```
2) Проверяем результат
@@ -26,8 +26,8 @@ Environment:
3) Создаем configmap
```bash
kubectl apply -f ~/slurm/practice/3.saving-configurations/1.env/configmap.yaml
kubectl apply -f ~/slurm/practice/3.saving-configurations/1.env/deployment-with-env-cm.yaml
kubectl apply -f ~/slurm/practice/4.saving-configurations/1.env/configmap.yaml
kubectl apply -f ~/slurm/practice/4.saving-configurations/1.env/deployment-with-env-cm.yaml
```
4) Проверяем результат
@@ -31,7 +31,7 @@ spec:
- containerPort: 80
resources:
requests:
cpu: 50m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
@@ -28,7 +28,7 @@ spec:
- containerPort: 80
resources:
requests:
cpu: 50m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
@@ -15,7 +15,7 @@ kubectl get secret test -o yaml
Для этого выполним команду:
```bash
kubectl apply -f ~/slurm/practice/3.saving-configurations/2.secret/deployment-with-secret.yaml
kubectl apply -f ~/slurm/practice/4.saving-configurations/2.secret/deployment-with-secret.yaml
```
3) Проверяем результат
@@ -37,7 +37,7 @@ Environment:
4) Применяем манифест с секретом
```bash
kubectl apply -f ~/slurm/practice/3.saving-configurations/2.secret/secret.yaml
kubectl apply -f ~/slurm/practice/4.saving-configurations/2.secret/secret.yaml
```
5) Проверяем что в секрете
@@ -36,7 +36,7 @@ spec:
- containerPort: 80
resources:
requests:
cpu: 50m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
@@ -5,7 +5,7 @@
Для этого выполним команду:
```bash
kubectl apply -f ~/slurm/practice/3.saving-configurations/3.configmap/
kubectl apply -f ~/slurm/practice/4.saving-configurations/3.configmap/
```
2) Проверяем
@@ -25,7 +25,7 @@ spec:
- containerPort: 80
resources:
requests:
cpu: 50m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
@@ -5,7 +5,7 @@
Для этого выполним команду:
```bash
kubectl apply -f ~/slurm/practice/3.saving-configurations/4.downward/
kubectl apply -f ~/slurm/practice/4.saving-configurations/4.downward/
```
2) Смотрим переменные окружения в контейнере
@@ -57,7 +57,7 @@ spec:
- containerPort: 80
resources:
requests:
cpu: 50m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
+1 -1
View File
@@ -3,7 +3,7 @@
1) Применяем манифест
```bash
kubectl apply -f ~/slurm/practice/4.saving-data/1.hostpath/
kubectl apply -f ~/slurm/practice/5.saving-data/1.hostpath/
kubectl get pod
kubectl get all
@@ -25,7 +25,7 @@ spec:
- containerPort: 80
resources:
requests:
cpu: 50m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
+1 -1
View File
@@ -3,7 +3,7 @@
1) Применяем манифест
```bash
kubectl apply -f ~/slurm/practice/4.saving-data/2.emptydir/
kubectl apply -f ~/slurm/practice/5.saving-data/2.emptydir/
```
2) Заходим в под и создаем файлик на томе empty dir
@@ -25,7 +25,7 @@ spec:
- containerPort: 80
resources:
requests:
cpu: 50m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
+3 -3
View File
@@ -3,7 +3,7 @@
1) Применяем манифест pvc.yml
```bash
kubectl apply -f ~/slurm/practice/4.saving-data/3.pvc/pvc.yaml
kubectl apply -f ~/slurm/practice/5.saving-data/3.pvc/pvc.yaml
kubectl get pvc
kubectl get pv
@@ -12,7 +12,7 @@ kubectl get pv
2) Запустим приложение, использующее PV
```bash
kubectl apply -f ~/slurm/practice/4.saving-data/3.pvc/
kubectl apply -f ~/slurm/practice/5.saving-data/3.pvc/
```
3) Посмотрим describe и смонтированные тома в контейнере
@@ -25,5 +25,5 @@ kubectl exec -it fileshare-<TAB> -- df -h
4) Очищаем
```bash
kubectl delete -f ~/slurm/practice/4.saving-data/3.pvc/
kubectl delete -f ~/slurm/practice/5.saving-data/3.pvc/
```
+1 -1
View File
@@ -32,7 +32,7 @@ spec:
- containerPort: 80
resources:
requests:
cpu: 50m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m
+1 -1
View File
@@ -8,4 +8,4 @@ spec:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storage: 10Mi
@@ -49,7 +49,7 @@ spec:
periodSeconds: 10
resources:
requests:
cpu: 50m
cpu: 10m
memory: 100Mi
limits:
cpu: 100m