mirror of
https://github.com/slurm-personal/school-dev-k8s.git
synced 2026-06-27 13:50:24 +00:00
reduce resource usage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user