-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69188aa
commit a0c34e3
Showing
11 changed files
with
92 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## Домашнее задание №16 «Развертывание в Kubernetes» | ||
|
||
### Критерии оценки | ||
- [ ] Кластер Kubernetes развернут и работает - 2 балла (приложить скриншоты в MR) | ||
- [ ] Написаны корректные манифесты для всех процессов приложения - 3 балла | ||
- [ ] Создан Helm chart, манифесты шаблонизированы - 3 балла | ||
- [ ] В `values.yaml` указаны дефолтные значения - 2 балла | ||
|
||
#### Зачёт от 7 баллов |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v2 | ||
name: calendar-chart | ||
description: A Helm chart for the Calendar application | ||
version: 0.1.0 | ||
appVersion: "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ LABEL MAINTAINERS="[email protected]" | |
ENV BIN_FILE "/opt/calendar/calendar-app" | ||
COPY --from=build ${BIN_FILE} ${BIN_FILE} | ||
|
||
ENV CONFIG_FILE /etc/calendar/config.toml | ||
COPY ./configs/config.toml ${CONFIG_FILE} | ||
ENV CONFIG_FILE /etc/calendar/config.yaml | ||
COPY ./configs/config.yaml ${CONFIG_FILE} | ||
|
||
CMD ${BIN_FILE} -config ${CONFIG_FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
## Домашнее задание №16 «Развертывание в Kubernetes» | ||
|
||
### Задание | ||
1. Развернуть кластер Kubernetes (minikube/k3s/microk8s). | ||
2. Написать Kubernetes манифесты для процессов приложения календаря (Deployment, Service, Ingress). | ||
3. Написать Helm chart для шаблонизации манифестов, создать values файл с дефолтными значениями. | ||
|
||
### Порядок выполнения | ||
|
||
#### 1. Развертывание кластера Kubernetes | ||
Выберите один из следующих инструментов для развертывания кластера Kubernetes: | ||
- Minikube | ||
- k3s | ||
- MicroK8s | ||
|
||
Следуйте официальной документации выбранного инструмента для установки и настройки кластера. | ||
|
||
#### 2. Написание Kubernetes манифестов | ||
Создайте манифесты для следующих ресурсов: | ||
- Deployment: для каждого процесса приложения календаря (API, Планировщик, Рассыльщик). | ||
- Service: для каждого Deployment, чтобы обеспечить доступ к подам. | ||
- Ingress: для маршрутизации внешнего трафика к сервисам. | ||
|
||
Пример структуры файлов: | ||
```yaml | ||
calendar-chart/ | ||
charts/ | ||
templates/ | ||
deployment.yaml | ||
service.yaml | ||
ingress.yaml | ||
values.yaml | ||
Chart.yaml | ||
``` | ||
#### 3. Написание Helm chart | ||
Создайте Helm chart для шаблонизации манифестов. | ||
|
||
|
||
В файле `values.yaml` укажите дефолтные значения для параметров, используемых в шаблонах. | ||
|
||
### Критерии оценки | ||
- Кластер Kubernetes развернут и работает - 2 балла (приложить скриншоты в MR) | ||
- Написаны корректные манифесты для всех процессов приложения - 3 балла | ||
- Создан Helm chart, манифесты шаблонизированы. - 3 балла | ||
- В `values.yaml` указаны дефолтные значения. - 2 балла | ||
|
||
#### Зачёт от 7 баллов |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
replicaCount: 1 | ||
|
||
image: | ||
repository: my-calendar-app | ||
tag: "latest" | ||
pullPolicy: IfNotPresent | ||
|
||
service: | ||
type: ClusterIP | ||
port: 80 | ||
|
||
ingress: | ||
enabled: false | ||
annotations: {} | ||
hosts: | ||
- host: chart-example.local | ||
paths: [] | ||
tls: [] | ||
|
||
resources: {} | ||
nodeSelector: {} | ||
affinity: {} |