How do I find out all Deckhouse parameters? | Как узнать все параметры Deckhouse? | ||||||||
Deckhouse is configured using global settings, module settings, and various custom resources. Read more in the documentation. | Deckhouse настраивается с помощью глобальных настроек, настроек модулей и различных кастомных ресурсов. Подробнее — в документации. | ||||||||
|
| ||||||||
shell kubectl get mc global -o yaml | shell kubectl get mc global -o yaml | ||||||||
|
| ||||||||
shell kubectl get modules | shell kubectl get modules | ||||||||
|
| ||||||||
shell kubectl get moduleconfigs user-authn -o yaml | shell kubectl get moduleconfigs user-authn -o yaml | ||||||||
How do I find the documentation for the version installed? | Как найти документацию по установленной у меня версии? | ||||||||
The documentation for the Deckhouse version running in the cluster is available at | Документация запущенной в кластере версии Deckhouse доступна по адресу | ||||||||
Documentation is available when the documentation module is enabled. It is enabled by default except the | Документация доступна, если в кластере включен модуль documentation. Он включен по умолчанию, кроме варианта поставки | ||||||||
Deckhouse update | Обновление Deckhouse | ||||||||
How to find out in which mode the cluster is being updated? | Как понять, в каком режиме обновляется кластер? | ||||||||
You can view the cluster update mode in the configuration of the | Посмотреть режим обновления кластера можно в конфигурации модуля | ||||||||
shell kubectl get mc deckhouse -oyaml | shell kubectl get mc deckhouse -oyaml | ||||||||
Example of the output: | Пример вывода: | ||||||||
yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: creationTimestamp: “2022-12-14T11:13:03Z” generation: 1 name: deckhouse resourceVersion: “3258626079” uid: c64a2532-af0d-496b-b4b7-eafb5d9a56ee spec: settings: releaseChannel: Stable update: windows:
| yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: creationTimestamp: “2022-12-14T11:13:03Z” generation: 1 name: deckhouse resourceVersion: “3258626079” uid: c64a2532-af0d-496b-b4b7-eafb5d9a56ee spec: settings: releaseChannel: Stable update: windows:
| ||||||||
There are three possible update modes: | Существуют три возможных режима обновления: | ||||||||
|
| ||||||||
How do I set the desired release channel? | Как установить желаемый канал обновлений? | ||||||||
Change (set) the releaseChannel parameter in the | Чтобы перейти на другой канал обновлений автоматически, нужно в конфигурации модуля | ||||||||
It will activate the mechanism of automatic stabilization of the release channel. | В этом случае включится механизм автоматической стабилизации релизного канала. | ||||||||
Here is an example of the | Пример конфигурации модуля | ||||||||
yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: releaseChannel: Stable | yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: releaseChannel: Stable | ||||||||
How do I disable automatic updates? | Как отключить автоматическое обновление? | ||||||||
To completely disable the Deckhouse update mechanism, remove the releaseChannel parameter in the | Чтобы полностью отключить механизм обновления Deckhouse, удалите в конфигурации модуля | ||||||||
In this case, Deckhouse does not check for updates and doesn’t apply patch releases. | В этом случае Deckhouse не проверяет обновления и не выполняется обновление на patch-релизы. | ||||||||
It is highly not recommended to disable automatic updates! It will block updates to patch releases that may contain critical vulnerabilities and bugs fixes. | Крайне не рекомендуется отключать автоматическое обновление! Это заблокирует обновления на patch-релизы, которые могут содержать исправления критических уязвимостей и ошибок. | ||||||||
How do I apply an update without having to wait for the update window, canary-release and manual update mode? | Как применить обновление минуя окна обновлений, canary-release и ручной режим обновлений? | ||||||||
To apply an update immediately, set the | Чтобы применить обновление немедленно, установите в соответствующем ресурсе DeckhouseRelease аннотацию | ||||||||
Caution! In this case, the update windows, settings canary-release and manual cluster update mode will be ignored. The update will be applied immediately after the annotation is installed. | Обратите внимание! В этом случае будут проигнорированы окна обновления, настройки canary-release и режим ручного обновления кластера. Обновление применится сразу после установки аннотации. | ||||||||
An example of a command to set the annotation to skip the update windows for version | Пример команды установки аннотации пропуска окон обновлений для версии | ||||||||
shell kubectl annotate deckhousereleases v1.56.2 release.deckhouse.io/apply-now=”true” | shell kubectl annotate deckhousereleases v1.56.2 release.deckhouse.io/apply-now=”true” | ||||||||
An example of a resource with the update window skipping annotation in place: | Пример ресурса с установленной аннотацией пропуска окон обновлений: | ||||||||
yaml apiVersion: deckhouse.io/v1alpha1 kind: DeckhouseRelease metadata: annotations: release.deckhouse.io/apply-now: “true” … | yaml apiVersion: deckhouse.io/v1alpha1 kind: DeckhouseRelease metadata: annotations: release.deckhouse.io/apply-now: “true” … | ||||||||
How to understand what changes the update contains and how it will affect the cluster? | Как понять, какие изменения содержит обновление и как это повлияет на работу кластера? | ||||||||
You can find all the information about Deckhouse versions in the list of Deckhouse releases. | Информацию о всех версиях Deckhouse можно найти в списке релизов Deckhouse. | ||||||||
Summary information about important changes, component version updates, and which components in the cluster will be restarted during the update process can be found in the description of the zero patch version of the release. For example, v1.46.0 for the v1.46 Deckhouse release. | Сводную информацию о важных изменениях, об обновлении версий компонентов, а также о том, какие компоненты в кластере буду перезапущены в процессе обновления, можно найти в описании нулевой patch-версии релиза. Например, v1.46.0 для релиза v1.46 Deckhouse. | ||||||||
A detailed list of changes can be found in the Changelog, which is referenced in each release. | Подробный список изменений можно найти в Changelog, ссылка на который есть в каждом релизе. | ||||||||
How do I understand that the cluster is being updated? | Как понять, что в кластере идет обновление? | ||||||||
During the update: | Во время обновления: | ||||||||
|
| ||||||||
How do I know that the update was successful? | Как понять, что обновление прошло успешно? | ||||||||
If the | Если алерт | ||||||||
You can also check the status of Deckhouse releases by running the following command: | Также вы можете проверить состояние релизов Deckhouse, выполнив следующую команду: | ||||||||
bash kubectl get deckhouserelease | shell kubectl get deckhouserelease | ||||||||
Example output: | Пример вывода: | ||||||||
console NAME PHASE TRANSITIONTIME MESSAGE v1.46.8 Superseded 13d v1.46.9 Superseded 11d v1.47.0 Superseded 4h12m v1.47.1 Deployed 4h12m | console NAME PHASE TRANSITIONTIME MESSAGE v1.46.8 Superseded 13d v1.46.9 Superseded 11d v1.47.0 Superseded 4h12m v1.47.1 Deployed 4h12m | ||||||||
The | Статус | ||||||||
Check the status of the Deckhouse Pod: | Проверьте состояние пода Deckhouse: | ||||||||
shell kubectl -n d8-system get pods -l app=deckhouse | shell kubectl -n d8-system get pods -l app=deckhouse | ||||||||
Example output: | Пример вывода команды: | ||||||||
console NAME READY STATUS RESTARTS AGE deckhouse-7844b47bcd-qtbx9 1/1 Running 0 1d | console NAME READY STATUS RESTARTS AGE deckhouse-7844b47bcd-qtbx9 1/1 Running 0 1d | ||||||||
|
| ||||||||
Possible options for action if something went wrong: | Возможные варианты действий, если что-то пошло не так: | ||||||||
|
| ||||||||
shell kubectl -n d8-system logs -f -l app=deckhouse | jq -Rr ‘fromjson? | .msg’ | shell kubectl -n d8-system logs -f -l app=deckhouse | jq -Rr ‘fromjson? | .msg’ | ||||||||
|
| ||||||||
How do I know that a new version is available for the cluster? | Как узнать, что для кластера доступна новая версия? | ||||||||
As soon as a new version of Deckhouse appears on the release channel installed in the cluster: | Как только на установленном в кластере канале обновления появляется новая версия Deckhouse: | ||||||||
|
| ||||||||
How do I get information about the upcoming update in advance? | Как заранее получать информацию о предстоящем обновлении? | ||||||||
You can get information in advance about updating minor versions of Deckhouse on the release channel in the following ways: | Заранее получать информацию об обновлении минорных версий Deckhouse на канале обновлений можно следующими способами: | ||||||||
|
| ||||||||
How do I find out which version of Deckhouse is on which release channel? | Как узнать, какая версия Deckhouse находится на каком канале обновлений? | ||||||||
Information about which version of Deckhouse is on which release channel can be obtained at https://releases.deckhouse.io. | Информацию о версиях Deckhouse и их связях с каналами обновлений можно получить на https://releases.deckhouse.ru. | ||||||||
How does automatic Deckhouse update work? | Как работает автоматическое обновление Deckhouse? | ||||||||
Every minute Deckhouse checks a new release appeared in the release channel specified by the releaseChannel parameter. | Если в конфигурации модуля | ||||||||
When a new release appears on the release channel, Deckhouse downloads it and creates CustomResource DeckhouseRelease. | При появлении нового релиза Deckhouse скачает его в кластер и создаст кастомный ресурс DeckhouseRelease. | ||||||||
After creating a | После появления кастомного ресурса | ||||||||
To get list and status of all releases use the following command: | Чтобы посмотреть список и состояние всех релизов, воспользуйтесь командой: | ||||||||
shell kubectl get deckhousereleases | shell kubectl get deckhousereleases | ||||||||
Patch releases (e.g., an update from version | Patch-релизы (например, обновление на версию | ||||||||
What happens when the release channel changes? | Что происходит при смене канала обновлений? | ||||||||
|
| ||||||||
What do I do if Deckhouse fails to retrieve updates from the release channel? | Что делать, если Deckhouse не получает обновлений из канала обновлений? | ||||||||
|
| ||||||||
To retrieve the IP address of the Deckhouse container registry on a node, run the following command: |
| ||||||||
shell getent ahosts registry.deckhouse.io | Чтобы получить IP-адрес хранилища образов Deckhouse на узле, выполните следующую команду: | ||||||||
Example output: | shell getent ahosts registry.deckhouse.ru | ||||||||
console 46.4.145.194 STREAM registry.deckhouse.io 46.4.145.194 DGRAM 46.4.145.194 RAW | Пример вывода: | ||||||||
To retrieve the IP address of the Deckhouse container registry in a pod, run the following command: | console 185.193.90.38 STREAM registry.deckhouse.ru 185.193.90.38 DGRAM 185.193.90.38 RAW | ||||||||
shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – getent ahosts registry.deckhouse.io | Чтобы получить IP-адрес хранилища образов Deckhouse в поде Deckhouse, выполните следующую команду: | ||||||||
Example output: console 46.4.145.194 STREAM registry.deckhouse.io 46.4.145.194 DGRAM registry.deckhouse.io | shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – getent ahosts registry.deckhouse.ru | ||||||||
If the retrieved IP addresses do not match, inspect the DNS settings on the host.
Specifically, check the list of domains in the | Пример вывода: | ||||||||
console 185.193.90.38 STREAM registry.deckhouse.ru 185.193.90.38 DGRAM registry.deckhouse.ru | |||||||||
In the example, DNS settings produce different results when resolving names on the host and in the Kubernetes pod: | Если полученные IP-адреса не совпадают, проверьте настройки DNS на узле.
Обратите внимание на список доменов в параметре | ||||||||
| |||||||||
text nameserver 10.0.0.10 search company.my | Пример, когда настройки DNS приводят к различному результату при разрешении имен на узле и в поде Kubernetes: | ||||||||
|
| ||||||||
| text nameserver 10.0.0.10 search company.my | ||||||||
In this case, subject to the |
| ||||||||
On the other hand, when accessing |
| ||||||||
С учетом параметра | |||||||||
How to check the job queue in Deckhouse? | При обращении на адрес | ||||||||
To view the status of all Deckhouse job queues, run the following command: | Как проверить очередь заданий в Deckhouse? | ||||||||
shell kubectl -n d8-system exec -it svc/deckhouse-leader -c deckhouse – deckhouse-controller queue list | Для просмотра состояния всех очередей заданий Deckhouse, выполните следующую команду: | ||||||||
Example of the output (queues are empty): | shell kubectl -n d8-system exec -it svc/deckhouse-leader -c deckhouse – deckhouse-controller queue list | ||||||||
console Summary:
| Пример вывода (очереди пусты): | ||||||||
To view the status of the | console Summary:
| ||||||||
shell kubectl -n d8-system exec -it svc/deckhouse-leader -c deckhouse – deckhouse-controller queue main | Для просмотра состояния очереди заданий | ||||||||
Example of the output (38 tasks in the | shell kubectl -n d8-system exec -it svc/deckhouse-leader -c deckhouse – deckhouse-controller queue main | ||||||||
console Queue ‘main’: length 38, status: ‘run first task’ | Пример вывода (в очереди | ||||||||
Example of the output (the | console Queue ‘main’: length 38, status: ‘run first task’ | ||||||||
console Queue ‘main’: length 0, status: ‘waiting for task 0s’ | Пример вывода (очередь | ||||||||
Air-gapped environment; working via proxy and third-party registry | console Queue ‘main’: length 0, status: ‘waiting for task 0s’ | ||||||||
How do I configure Deckhouse to use a third-party registry? | Закрытое окружение, работа через proxy и сторонние registry | ||||||||
This feature is available in the following editions: BE, SE, SE+, EE. | Как установить Deckhouse из стороннего registry? | ||||||||
Deckhouse only supports Bearer authentication for container registries. | Доступно в следующих редакциях: BE, SE, SE+, EE, CSE Lite (1.67), CSE Pro (1.67). | ||||||||
Tested and guaranteed to work with the following container registries: {{- registry[1].shortname }} , . | Deckhouse поддерживает работу только с Bearer token-схемой авторизации в container registry. | ||||||||
Deckhouse can be configured to work with a third-party registry (e.g., a proxy registry inside private environments). | Протестирована и гарантируется работа со следующими container registry: {{- registry[1].shortname }} , . | ||||||||
Define the following parameters in the | При установке Deckhouse можно настроить на работу со сторонним registry (например, проксирующий registry внутри закрытого контура). | ||||||||
| Установите следующие параметры в ресурсе | ||||||||
Use the following |
| ||||||||
json
{“auths”: { “ | Если разрешен анонимный доступ к образам Deckhouse в стороннем registry, | ||||||||
| json
{“auths”: { “ | ||||||||
Use the following | Приведенное значение должно быть закодировано в Base64. | ||||||||
json
{“auths”: { “ | Если для доступа к образам Deckhouse в стороннем registry необходима аутентификация, | ||||||||
| json
{“auths”: { “ | ||||||||
| где: | ||||||||
You can use the following script to generate |
| ||||||||
shell
declare MYUSER=’ | Итоговое значение для | ||||||||
| Вы можете использовать следующий скрипт для генерации | ||||||||
echo “$MYRESULTSTRING” | shell
declare MYUSER=’ | ||||||||
The |
| ||||||||
| echo “$MYRESULTSTRING” | ||||||||
Для настройки нестандартных конфигураций сторонних registry в ресурсе | |||||||||
Tips for configuring Nexus |
| ||||||||
When interacting with a | |||||||||
Using the | Особенности настройки Nexus | ||||||||
The following requirements must be met if the Nexus repository manager is used: | При взаимодействии с репозиторием типа | ||||||||
| Использование значения | ||||||||
Configuration: | При использовании менеджера репозиториев Nexus должны быть выполнены следующие требования: | ||||||||
|
| ||||||||
| Настройка: | ||||||||
|
| ||||||||
|
| ||||||||
| |||||||||
|
| ||||||||
Thus, Deckhouse images will be available at |
| ||||||||
Tips for configuring Harbor | |||||||||
Use the Harbor Proxy Cache feature. | В результате образы Deckhouse будут доступны, например, по следующему адресу: | ||||||||
| Особенности настройки Harbor | ||||||||
Используйте функцию Harbor Proxy Cache. | |||||||||
|
| ||||||||
Thus, Deckhouse images will be available at |
| ||||||||
Manually uploading Deckhouse Kubernetes Platform, vulnerability scanner DB and Deckhouse modules to private registry | |||||||||
The | В результате настройки, образы Deckhouse станут доступны, например, по следующему адресу: | ||||||||
Check releases.deckhouse.io for the current status of the release channels. | Ручная загрузка образов Deckhouse Kubernetes Platform, БД сканера уязвимостей и модулей Deckhouse в приватный registry | ||||||||
Утилита | |||||||||
| О текущем статусе версий на каналах обновлений можно узнать на releases.deckhouse.ru. | ||||||||
By default, | |||||||||
Run the following command (specify the edition code and the license key) to download actual images: |
| ||||||||
shell
d8 mirror pull | По умолчанию | ||||||||
where:
| Выполните следующую команду (укажите код редакции и лицензионный ключ), чтобы скачать образы актуальных версий: | ||||||||
| shell
d8 mirror pull | ||||||||
You can also use the following command options:
| где: | ||||||||
Additional configuration options for the
|
| ||||||||
Example of a command to download all versions of Deckhouse EE starting from version 1.59 (provide the license key): |
| ||||||||
shell
d8 mirror pull | Вы также можете использовать следующие параметры команды: | ||||||||
Example of a command to download versions of Deckhouse SE for every release-channel available: |
| ||||||||
shell
d8 mirror pull | Дополнительные параметры конфигурации для семейства команд | ||||||||
Example of a command to download all versions of Deckhouse hosted on a third-party registry: |
| ||||||||
shell
d8 mirror pull | Пример команды для загрузки всех версий Deckhouse EE начиная с версии 1.59 (укажите лицензионный ключ): | ||||||||
Example of a command to download latest vulnerability scanner databases (if available for your deckhouse edition): | shell
d8 mirror pull | ||||||||
shell
d8 mirror pull | Пример команды для загрузки актуальных версий Deckhouse SE (укажите лицензионный ключ): | ||||||||
Example of a command to download all of Deckhouse modules available in registry: | shell
d8 mirror pull | ||||||||
shell
d8 mirror pull | Пример команды для загрузки образов Deckhouse из стороннего хранилища образов: | ||||||||
Example of a command to download | shell
d8 mirror pull | ||||||||
shell
d8 mirror pull | Пример команды для загрузки пакета баз данных сканера уязвимостей: | ||||||||
| shell
d8 mirror pull | ||||||||
| Пример команды для загрузки пакетов всех доступных дополнительных модулей: | ||||||||
The | shell
d8 mirror pull | ||||||||
Example of a command for pushing images from the | Пример команды для загрузки пакетов модулей | ||||||||
shell
d8 mirror push /mnt/MEDIA/d8-images ‘corp.company.com:5000/sys/deckhouse’ | shell
d8 mirror pull | ||||||||
|
| ||||||||
|
| ||||||||
When launching the installer, use a repository where Deckhouse images have previously been loaded instead of official Deckhouse registry. For example, the address for launching the installer will look like | Команда | ||||||||
During installation, add your registry address and authorization data to the InitConfiguration resource (the imagesRepo and registryDockerCfg parameters; you might refer to step 3 of the Getting started guide as well). | Пример команды для загрузки пакетов образов из директории | ||||||||
After installation, apply DeckhouseReleases manifests that were generated by the | shell
d8 mirror push /mnt/MEDIA/d8-images ‘corp.company.com:5000/sys/deckhouse’ | ||||||||
shell d8 k apply -f ./deckhousereleases.yaml |
| ||||||||
How do I switch a running Deckhouse cluster to use a third-party registry? |
| ||||||||
Using a registry other than | При запуске установщика используйте не официальное публичное хранилище образов Deckhouse, а хранилище в которое ранее были загружены образы Deckhouse. Для примера выше адрес запуска установщика будет иметь вид | ||||||||
To switch the Deckhouse cluster to using a third-party registry, follow these steps: | В ресурсе InitConfiguration при установке также используйте адрес вашего хранилища и данные авторизации (параметры imagesRepo, registryDockerCfg или шаг 3 руководства по быстрому старту). | ||||||||
| После завершения установки примените сгенерированные во время загрузки манифесты DeckhouseReleases к вашему кластеру, используя Deckhouse CLI: | ||||||||
shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller helper change-registry –user MY-USER –password MY-PASSWORD registry.example.com/deckhouse/ee | shell d8 k apply -f ./deckhousereleases.yaml | ||||||||
| Как переключить работающий кластер Deckhouse на использование стороннего registry? | ||||||||
shell CA_CONTENT=$(cat «EOF —–BEGIN CERTIFICATE—– CERTIFICATE —–END CERTIFICATE—– —–BEGIN CERTIFICATE—– CERTIFICATE —–END CERTIFICATE—– EOF ) kubectl -n d8-system exec svc/deckhouse-leader -c deckhouse – bash -c “echo ‘$CA_CONTENT’ > /tmp/ca.crt && deckhouse-controller helper change-registry –ca-file /tmp/ca.crt –user MY-USER –password MY-PASSWORD registry.example.com/deckhouse/ee” | Использование registry, отличных от | ||||||||
| Для переключения кластера Deckhouse на использование стороннего registry выполните следующие действия: | ||||||||
shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller helper change-registry –help |
| ||||||||
Example output: | shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller helper change-registry –user MY-USER –password MY-PASSWORD registry.example.com/deckhouse/ee | ||||||||
console
usage: deckhouse-controller helper change-registry [ |
| ||||||||
Change registry for deckhouse images. | shell CA_CONTENT=$(cat «EOF —–BEGIN CERTIFICATE—– CERTIFICATE —–END CERTIFICATE—– —–BEGIN CERTIFICATE—– CERTIFICATE —–END CERTIFICATE—– EOF ) kubectl -n d8-system exec svc/deckhouse-leader -c deckhouse – bash -c “echo ‘$CA_CONTENT’ > /tmp/ca.crt && deckhouse-controller helper change-registry –ca-file /tmp/ca.crt –user MY-USER –password MY-PASSWORD registry.example.com/deckhouse/ee” | ||||||||
Flags: –help Show context-sensitive help (also try –help-long and –help-man). –user=USER User with pull access to registry. –password=PASSWORD Password/token for registry user. –ca-file=CA-FILE Path to registry CA. –scheme=SCHEME Used scheme while connecting to registry, http or https. –dry-run Don’t change deckhouse resources, only print them. –new-deckhouse-tag=NEW-DECKHOUSE-TAG New tag that will be used for deckhouse deployment image (by default current tag from deckhouse deployment will be used). | Просмотреть список доступных ключей команды | ||||||||
Args: | shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller helper change-registry –help | ||||||||
| Пример вывода: | ||||||||
shell kubectl get pods -A -o json | jq -r ‘.items[] | select(.spec.containers[] | select(.image | startswith(“registry.deckhouse”))) | .metadata.namespace + “\t” + .metadata.name’ | sort | uniq | console
usage: deckhouse-controller helper change-registry [ | ||||||||
How to bootstrap a cluster and run Deckhouse without the usage of release channels? | Change registry for deckhouse images. | ||||||||
This method should only be used if there are no release channel images in your air-gapped registry. | Flags: –help Show context-sensitive help (also try –help-long and –help-man). –user=USER User with pull access to registry. –password=PASSWORD Password/token for registry user. –ca-file=CA-FILE Path to registry CA. –scheme=SCHEME Used scheme while connecting to registry, http or https. –dry-run Don’t change deckhouse resources, only print them. –new-deckhouse-tag=NEW-DECKHOUSE-TAG New tag that will be used for deckhouse deployment image (by default current tag from deckhouse deployment will be used). | ||||||||
If you want to install Deckhouse with automatic updates disabled: | Args: | ||||||||
|
| ||||||||
If you want to disable automatic updates for an already installed Deckhouse (including patch release updates), remove the releaseChannel parameter from the | shell kubectl get pods -A -o json | jq -r ‘.items[] | select(.spec.containers[] | select(.image | startswith(“registry.deckhouse”))) | .metadata.namespace + “\t” + .metadata.name’ | sort | uniq | ||||||||
Using a proxy server | Как создать кластер и запустить Deckhouse без использования каналов обновлений? | ||||||||
This feature is available in the following editions: BE, SE, SE+, EE. | Этот способ следует использовать только в случае, если в изолированном приватном registry нет образов, содержащих информацию о каналах обновлений. | ||||||||
Если необходимо установить Deckhouse с отключенным автоматическим обновлением: | |||||||||
|
| ||||||||
shell apt-get install squid | Если вы хотите отключить автоматические обновления у уже установленного Deckhouse (включая обновления patch-релизов), удалите параметр releaseChannel из конфигурации модуля | ||||||||
| Использование proxy-сервера | ||||||||
shell cat «EOF > /etc/squid/squid.conf auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid/passwords auth_param basic realm proxy acl authenticated proxy_auth REQUIRED http_access allow authenticated | Доступно в следующих редакциях: BE, SE, SE+, EE, CSE Lite (1.67), CSE Pro (1.67). | ||||||||
Choose the port you want. Below we set it to default 3128. http_port 3128 | |||||||||
|
| ||||||||
Example for the user | shell apt-get install squid | ||||||||
shell echo “test:$(openssl passwd -crypt test)” » /etc/squid/passwords |
| ||||||||
| shell cat «EOF > /etc/squid/squid.conf auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid/passwords auth_param basic realm proxy acl authenticated proxy_auth REQUIRED http_access allow authenticated | ||||||||
shell systemctl restart squid systemctl enable squid | Укажите необходимый порт. Порт 3128 используется по умолчанию. http_port 3128 | ||||||||
| |||||||||
Use the proxy parameter of the | Пример для пользователя | ||||||||
An example: | shell echo “test:$(openssl passwd -crypt test)” » /etc/squid/passwords | ||||||||
yaml apiVersion: deckhouse.io/v1 kind: ClusterConfiguration clusterType: Cloud cloud: provider: OpenStack prefix: main podSubnetCIDR: 10.111.0.0/16 serviceSubnetCIDR: 10.222.0.0/16 kubernetesVersion: “Automatic” cri: “Containerd” clusterDomain: “cluster.local” proxy: httpProxy: “http://user:password@proxy.company.my:3128” httpsProxy: “https://user:password@proxy.company.my:8443” |
| ||||||||
Changing the configuration | shell systemctl restart squid systemctl enable squid | ||||||||
To apply node configuration changes, you need to run the | |||||||||
How do I change the configuration of a cluster? | Для настройки Deckhouse на использование proxy используйте параметр proxy ресурса | ||||||||
The general cluster parameters are stored in the ClusterConfiguration structure. | Пример: | ||||||||
To change the general cluster parameters, run the command: | yaml apiVersion: deckhouse.io/v1 kind: ClusterConfiguration clusterType: Cloud cloud: provider: OpenStack prefix: main podSubnetCIDR: 10.111.0.0/16 serviceSubnetCIDR: 10.222.0.0/16 kubernetesVersion: “Automatic” cri: “Containerd” clusterDomain: “cluster.local” proxy: httpProxy: “http://user:password@proxy.company.my:3128” httpsProxy: “https://user:password@proxy.company.my:8443” | ||||||||
shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller edit cluster-configuration | Изменение конфигурации | ||||||||
After saving the changes, Deckhouse will bring the cluster configuration to the state according to the changed configuration. Depending on the size of the cluster, this may take some time. | Для применения изменений конфигурации узлов необходимо выполнить команду | ||||||||
How do I change the configuration of a cloud provider in a cluster? | Как изменить конфигурацию кластера? | ||||||||
Cloud provider setting of a cloud of hybrid cluster are stored in the | Общие параметры кластера хранятся в структуре ClusterConfiguration. | ||||||||
Regardless of the cloud provider used, its settings can be changed using the following command: | Чтобы изменить общие параметры кластера, выполните команду: | ||||||||
shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller edit provider-cluster-configuration | shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller edit cluster-configuration | ||||||||
How do I change the configuration of a static cluster? | После сохранения изменений Deckhouse приведет конфигурацию кластера к измененному состоянию. В зависимости от размеров кластера это может занять какое-то время. | ||||||||
Settings of a static cluster are stored in the StaticClusterConfiguration structure. | Как изменить конфигурацию облачного провайдера в кластере? | ||||||||
To change the settings of a static cluster, run the command: | Настройки используемого облачного провайдера в облачном или гибридном кластере хранятся в структуре | ||||||||
shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller edit static-cluster-configuration | Независимо от используемого облачного провайдера его настройки можно изменить с помощью следующей команды: | ||||||||
How to switch Deckhouse EE to CE? | shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller edit provider-cluster-configuration | ||||||||
The instruction implies using the public address of the container registry: | Как изменить конфигурацию статического кластера? | ||||||||
Deckhouse CE does not support cloud clusters on OpenStack and VMware vSphere. | Настройки статического кластера хранятся в структуре StaticClusterConfiguration. | ||||||||
Follow this steps to switch a Deckhouse Enterprise Edition to Community Edition (all commands must be executed on the master node, either by a user with a configured | Чтобы изменить параметры статического кластера, выполните команду: | ||||||||
| shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller edit static-cluster-configuration | ||||||||
shell DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl run ce-image –image=registry.deckhouse.io/deckhouse/ce/install:$DECKHOUSE_VERSION –command sleep – infinity | Как переключить Deckhouse EE на CE? | ||||||||
| Инструкция подразумевает использование публичного адреса container registry: | ||||||||
| В Deckhouse CE не поддерживается работа облачных кластеров на OpenStack и VMware vSphere. | ||||||||
| Для переключения Deckhouse Enterprise Edition на Community Edition выполните следующие действия (все команды выполняются на master-узле кластера от имени пользователя с настроенным контекстом | ||||||||
shell CE_SANDBOX_IMAGE=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.common.pause”) |
| ||||||||
Check the result of the command to make sure it was successful: | shell DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl run se-image –image=registry.deckhouse.ru/deckhouse/ce/install:$DECKHOUSE_VERSION –command sleep – infinity | ||||||||
shell echo $CE_SANDBOX_IMAGE |
| ||||||||
Example output: |
| ||||||||
console sha256:2a909cb9df4d0207f1fe5bd9660a0529991ba18ce6ce7b389dc008c05d9022d1 |
| ||||||||
| shell CE_SANDBOX_IMAGE=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.common.pause”) | ||||||||
shell CE_K8S_API_PROXY=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.controlPlaneManager.kubernetesApiProxy”) | Проверка: | ||||||||
Check the result of the command to make sure it was successful: | shell echo $CE_SANDBOX_IMAGE | ||||||||
shell echo $CE_K8S_API_PROXY | Пример вывода: | ||||||||
Example output: | console sha256:2a909cb9df4d0207f1fe5bd9660a0529991ba18ce6ce7b389dc008c05d9022d1 | ||||||||
console sha256:a5442437976a11dfa4860c2fbb025199d9d1b074222bb80173ed36b9006341dd |
| ||||||||
| shell CE_K8S_API_PROXY=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.controlPlaneManager.kubernetesApiProxy”) | ||||||||
shell CE_REGISTRY_PACKAGE_PROXY=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.registryPackagesProxy.registryPackagesProxy”) | Проверка: | ||||||||
Run the command: | shell echo $CE_K8S_API_PROXY | ||||||||
shell crictl pull registry.deckhouse.io/deckhouse/ce@$CE_REGISTRY_PACKAGE_PROXY | Пример вывода: | ||||||||
Example output: | console sha256:a5442437976a11dfa4860c2fbb025199d9d1b074222bb80173ed36b9006341dd | ||||||||
console Image is up to date for sha256:8127efa0f903a7194d6fb7b810839279b9934b200c2af5fc416660857bfb7832 |
| ||||||||
| shell CE_REGISTRY_PACKAGE_PROXY=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.registryPackagesProxy.registryPackagesProxy”) | ||||||||
shell CE_MODULES=$(kubectl exec ce-image – ls -l deckhouse/modules/ | grep -oE “\d.-\w” | awk {‘print $9’} | cut -c5-) | И выполните команду: | ||||||||
Check the result of the command to make sure it was successful: | shell crictl pull registry.deckhouse.ru/deckhouse/ce@$CE_REGISTRY_PACKAGE_PROXY | ||||||||
shell echo $CE_MODULES | Пример вывода: | ||||||||
Example output: | console Image is up to date for sha256:8127efa0f903a7194d6fb7b810839279b9934b200c2af5fc416660857bfb7832 | ||||||||
console common priority-class deckhouse external-module-manager registrypackages … |
| ||||||||
| shell CE_MODULES=$(kubectl exec ce-image – ls -l deckhouse/modules/ | grep -oE “\d.-\w” | awk {‘print $9’} | cut -c5-) | ||||||||
shell USED_MODULES=$(kubectl get modules -o custom-columns=NAME:.metadata.name,SOURCE:.properties.source,STATE:.properties.state,ENABLED:.status.phase | grep Embedded | grep -E ‘Enabled|Ready’ | awk {‘print $1’}) | Проверка: | ||||||||
Check the result of the command to make sure it was successful: | shell echo $CE_MODULES | ||||||||
shell echo $USED_MODULES | Пример вывода: | ||||||||
Example output: | console common priority-class deckhouse external-module-manager registrypackages … | ||||||||
console admission-policy-engine cert-manager chrony … |
| ||||||||
| shell USED_MODULES=$(kubectl get modules -o custom-columns=NAME:.metadata.name,SOURCE:.properties.source,STATE:.properties.state,ENABLED:.status.phase | grep Embedded | grep -E ‘Enabled|Ready’ | awk {‘print $1’}) | ||||||||
shell MODULES_WILL_DISABLE=$(echo $USED_MODULES | tr ‘ ‘ ‘\n’ | grep -Fxv -f <(echo $CE_MODULES | tr ‘ ‘ ‘\n’)) | Проверка: | ||||||||
Check the result of the command to make sure it was successful: | shell echo $USED_MODULES | ||||||||
shell echo $MODULES_WILL_DISABLE | Пример вывода: | ||||||||
Example output: | console admission-policy-engine cert-manager chrony … | ||||||||
console node-local-dns registry-packages-proxy |
| ||||||||
| shell MODULES_WILL_DISABLE=$(echo $USED_MODULES | tr ‘ ‘ ‘\n’ | grep -Fxv -f <(echo $CE_MODULES | tr ‘ ‘ ‘\n’)) | ||||||||
| Проверка: | ||||||||
For this, print a list of modules that are not supported in Deckhouse CE and will be disabled: | shell echo $MODULES_WILL_DISABLE | ||||||||
shell echo $MODULES_WILL_DISABLE | Пример вывода | ||||||||
| console node-local-dns registry-packages-proxy | ||||||||
Disable the modules that are not supported in Deckhouse CE: |
| ||||||||
shell echo $MODULES_WILL_DISABLE | tr ‘ ‘ ‘\n’ | awk {‘print “kubectl -n d8-system exec deploy/deckhouse – deckhouse-controller module disable”,$1’} | bash |
| ||||||||
An example of the output you might get as a result of running the previous command: | Отобразить список модулей, которые не поддерживаются в Deckhouse CE и будут отключены, можно следующей командой: | ||||||||
console Defaulted container “deckhouse” out of: deckhouse, kube-rbac-proxy, init-external-modules (init) Module node-local-dns disabled | shell echo $MODULES_WILL_DISABLE | ||||||||
Defaulted container “deckhouse” out of: deckhouse, kube-rbac-proxy, init-external-modules (init) Module registry-packages-proxy disabled |
| ||||||||
| Отключите не поддерживаемые в Deckhouse CE модули: | ||||||||
shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: containerd-ce-config.sh spec: nodeGroups:
| shell echo $MODULES_WILL_DISABLE | tr ‘ ‘ ‘\n’ | awk {‘print “kubectl -n d8-system exec deploy/deckhouse – deckhouse-controller module disable”,$1’} | bash | ||||||||
mkdir -p /etc/containerd/conf.d bb-sync-file /etc/containerd/conf.d/ce-registry.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] sandbox_image = “registry.deckhouse.io/deckhouse/ce@$CE_SANDBOX_IMAGE” [plugins.”io.containerd.grpc.v1.cri”.registry.configs] [plugins.”io.containerd.grpc.v1.cri”.registry.configs.”registry.deckhouse.io”.auth] auth = “” EOF_TOML | Пример результата выполнения: | ||||||||
| console Defaulted container “deckhouse” out of: deckhouse, kube-rbac-proxy, init-external-modules (init) Module node-local-dns disabled | ||||||||
EOF |
| ||||||||
Wait for the | shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: containerd-ce-config.sh spec: nodeGroups:
| ||||||||
The synchronization status can be tracked by the | mkdir -p /etc/containerd/conf.d bb-sync-file /etc/containerd/conf.d/ce-registry.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] sandbox_image = “registry.deckhouse.ru/deckhouse/ce@$CE_SANDBOX_IMAGE” [plugins.”io.containerd.grpc.v1.cri”.registry.configs] [plugins.”io.containerd.grpc.v1.cri”.registry.configs.”registry.deckhouse.ru”.auth] auth = “” EOF_TOML | ||||||||
shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w |
| ||||||||
Example output: | EOF | ||||||||
console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | Дождитесь появления файла | ||||||||
Also, the | Статус синхронизации можно отследить по значению | ||||||||
shell journalctl -u bashible -n 5 | shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | ||||||||
Example output: | Пример вывода: | ||||||||
console Aug 21 11:04:28 master-ee-to-ce-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ee-to-ce-0 bashible.sh[53407]: Annotate node master-ee-to-ce-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-ce-0 bashible.sh[53407]: Successful annotate node master-ee-to-ce-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-ce-0 systemd[1]: bashible.service: Deactivated successfully. | console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | ||||||||
| Также в журнале systemd-сервиса bashible должно появиться сообщение | ||||||||
bash
kubectl -n d8-system create secret generic deckhouse-registry | shell journalctl -u bashible -n 5 | ||||||||
| Пример вывода: | ||||||||
shell HANDLER=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.deckhouse.webhookHandler”) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/webhook-handler handler=registry.deckhouse.io/deckhouse/ce@$HANDLER | console Aug 21 11:04:28 master-ee-to-ce-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ee-to-ce-0 bashible.sh[53407]: Annotate node master-ee-to-ce-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-ce-0 bashible.sh[53407]: Successful annotate node master-ee-to-ce-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-ce-0 systemd[1]: bashible.service: Deactivated successfully. | ||||||||
|
| ||||||||
shell DECKHOUSE_KUBE_RBAC_PROXY=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.common.kubeRbacProxy”) DECKHOUSE_INIT_CONTAINER=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.common.init”) DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/deckhouse init-downloaded-modules=registry.deckhouse.io/deckhouse/ce@$DECKHOUSE_INIT_CONTAINER kube-rbac-proxy=registry.deckhouse.io/deckhouse/ce@$DECKHOUSE_KUBE_RBAC_PROXY deckhouse=registry.deckhouse.io/deckhouse/ce:$DECKHOUSE_VERSION | bash
kubectl -n d8-system create secret generic deckhouse-registry | ||||||||
|
| ||||||||
Use the following command to check the Deckhouse pod’s status: | shell HANDLER=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.deckhouse.webhookHandler”) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/webhook-handler handler=registry.deckhouse.ru/deckhouse/ce@$HANDLER | ||||||||
shell kubectl -n d8-system get po -l app=deckhouse |
| ||||||||
Use the following command to check the Deckhouse queue: | shell DECKHOUSE_KUBE_RBAC_PROXY=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.common.kubeRbacProxy”) DECKHOUSE_INIT_CONTAINER=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.common.init”) DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/deckhouse init-downloaded-modules=registry.deckhouse.ru/deckhouse/ce@$DECKHOUSE_INIT_CONTAINER kube-rbac-proxy=registry.deckhouse.ru/deckhouse/ce@$DECKHOUSE_KUBE_RBAC_PROXY deckhouse=registry.deckhouse.ru/deckhouse/ce:$DECKHOUSE_VERSION | ||||||||
shell kubectl -n d8-system exec deploy/deckhouse -c deckhouse – deckhouse-controller queue list |
| ||||||||
| Посмотреть статус пода Deckhouse: | ||||||||
shell kubectl get pods -A -o json | jq -r ‘.items[] | select(.spec.containers[] | select(.image | contains(“deckhouse.io/deckhouse/ee”))) | .metadata.namespace + “\t” + .metadata.name’ | sort | uniq | shell kubectl -n d8-system get po -l app=deckhouse | ||||||||
| Проверить состояние очереди Deckhouse: | ||||||||
| shell kubectl -n d8-system exec deploy/deckhouse -c deckhouse – deckhouse-controller queue list | ||||||||
shell kubectl delete ngc containerd-ce-config.sh kubectl delete pod ce-image kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: del-temp-config.sh spec: nodeGroups:
|
| ||||||||
Once bashible synchronization is complete (you can track the synchronization status on nodes via the | shell kubectl get pods -A -o json | jq -r ‘.items[] | select(.spec.containers[] | select(.image | contains(“deckhouse.ru/deckhouse/ee”))) | .metadata.namespace + “\t” + .metadata.name’ | sort | uniq | ||||||||
shell kubectl delete ngc del-temp-config.sh |
| ||||||||
How to switch Deckhouse CE to EE? |
| ||||||||
You will need a valid license key (you can request a trial license key if necessary). | shell kubectl delete ngc containerd-ce-config.sh kubectl delete pod ce-image kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: del-temp-config.sh spec: nodeGroups:
| ||||||||
The instruction implies using the public address of the container registry: | После синхронизации bashible (статус синхронизации на узлах можно отследить по значению | ||||||||
Follow this steps to switch a Deckhouse Community Edition to Enterprise Edition (all commands must be executed on the master node, either by a user with a configured | shell kubectl delete ngc del-temp-config.sh | ||||||||
| Как переключить Deckhouse CE на EE? | ||||||||
shell
LICENSE_TOKEN= | Вам потребуется действующий лицензионный ключ (вы можете запросить временный ключ при необходимости). | ||||||||
| Инструкция подразумевает использование публичного адреса container registry: | ||||||||
shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: containerd-ee-config.sh spec: nodeGroups:
| Для переключения Deckhouse Community Edition на Enterprise Edition выполните следующие действия (все команды выполняются на master-узле кластера от имени пользователя с настроенным контекстом | ||||||||
mkdir -p /etc/containerd/conf.d bb-sync-file /etc/containerd/conf.d/ee-registry.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] [plugins.”io.containerd.grpc.v1.cri”.registry.configs] [plugins.”io.containerd.grpc.v1.cri”.registry.configs.”registry.deckhouse.io”.auth] auth = “$AUTH_STRING” EOF_TOML |
| ||||||||
EOF | shell
LICENSE_TOKEN= | ||||||||
Wait for the |
| ||||||||
You can track the synchronization status via the | shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: containerd-ee-config.sh spec: nodeGroups:
| ||||||||
shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | mkdir -p /etc/containerd/conf.d bb-sync-file /etc/containerd/conf.d/ee-registry.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] [plugins.”io.containerd.grpc.v1.cri”.registry.configs] [plugins.”io.containerd.grpc.v1.cri”.registry.configs.”registry.deckhouse.ru”.auth] auth = “$AUTH_STRING” EOF_TOML | ||||||||
Example output: | EOF | ||||||||
console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | Дождитесь появления файла | ||||||||
Also, the | Статус синхронизации можно отследить по значению | ||||||||
shell journalctl -u bashible -n 5 | shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | ||||||||
Example output: | Пример вывода: | ||||||||
console Aug 21 11:04:28 master-ce-to-ee-0 bashible.sh[53407]: , nothing to do. Aug 21 11:04:28 master-ce-to-ee-0 bashible.sh[53407]: Annotate node master-ce-to-ee-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master ce-to-ee-0 bashible.sh[53407]: Successful annotate node master-ce-to-ee-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ce-to-ee-0 systemd[1]: bashible.service: Deactivated successfully. | console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | ||||||||
Run a temporary Deckhouse EE pod to retrieve up-to-date digests and module lists: | Также в журнале systemd-сервиса bashible должно появиться сообщение | ||||||||
shell DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl run ee-image –image=registry.deckhouse.io/deckhouse/ee/install:$DECKHOUSE_VERSION –command sleep – infinity | shell journalctl -u bashible -n 5 | ||||||||
| Пример вывода: | ||||||||
| console Aug 21 11:04:28 master-ce-to-ee-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ce-to-ee-0 bashible.sh[53407]: Annotate node master-ce-to-ee-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master ce-to-ee-0 bashible.sh[53407]: Successful annotate node master-ce-to-ee-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ce-to-ee-0 systemd[1]: bashible.service: Deactivated successfully. | ||||||||
| Выполните следующую команду для запуска временного пода Deckhouse EE для получения актуальных дайджестов и списка модулей: | ||||||||
shell EE_SANDBOX_IMAGE=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.common.pause”) | shell DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl run ee-image –image=registry.deckhouse.ru/deckhouse/ee/install:$DECKHOUSE_VERSION –command sleep – infinity | ||||||||
Check the result of the command to make sure it was successful: |
| ||||||||
shell echo $EE_SANDBOX_IMAGE |
| ||||||||
Example output: |
| ||||||||
console sha256:2a909cb9df4d0207f1fe5bd9660a0529991ba18ce6ce7b389dc008c05d9022d1 | shell EE_SANDBOX_IMAGE=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.common.pause”) | ||||||||
| Проверка: | ||||||||
shell EE_K8S_API_PROXY=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.controlPlaneManager.kubernetesApiProxy”) | shell echo $EE_SANDBOX_IMAGE | ||||||||
Check the result of the command to make sure it was successful: | Пример вывода: | ||||||||
shell echo $EE_K8S_API_PROXY | console sha256:2a909cb9df4d0207f1fe5bd9660a0529991ba18ce6ce7b389dc008c05d9022d1 | ||||||||
Example output: |
| ||||||||
console sha256:80a2cf757adad6a29514f82e1c03881de205780dbd87c6e24da0941f48355d6c | shell EE_K8S_API_PROXY=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.controlPlaneManager.kubernetesApiProxy”) | ||||||||
| Проверка: | ||||||||
shell EE_REGISTRY_PACKAGE_PROXY=$(kubectl exec ce-image – cat deckhouse/candi/images_digests.json | jq -r “.registryPackagesProxy.registryPackagesProxy”) | shell echo $EE_K8S_API_PROXY | ||||||||
Run the command: | Пример вывода: | ||||||||
shell crictl pull registry.deckhouse.io/deckhouse/ee@$EE_REGISTRY_PACKAGE_PROXY | console sha256:80a2cf757adad6a29514f82e1c03881de205780dbd87c6e24da0941f48355d6c | ||||||||
Example output: |
| ||||||||
console Image is up to date for sha256:8127efa0f903a7194d6fb7b810839279b9934b200c2af5fc416660857bfb7832 | shell EE_REGISTRY_PACKAGE_PROXY=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.registryPackagesProxy.registryPackagesProxy”) | ||||||||
| И выполните команду: | ||||||||
shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: ee-set-sha-images.sh spec: nodeGroups:
| shell crictl pull registry.deckhouse.ru/deckhouse/ee@$EE_REGISTRY_PACKAGE_PROXY | ||||||||
bb-sync-file /etc/containerd/conf.d/ee-sandbox.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] sandbox_image = “registry.deckhouse.io/deckhouse/ee@$EE_SANDBOX_IMAGE” EOF_TOML | Пример вывода: | ||||||||
| console Image is up to date for sha256:8127efa0f903a7194d6fb7b810839279b9934b200c2af5fc416660857bfb7832 | ||||||||
EOF |
| ||||||||
Wait for the | shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: ee-set-sha-images.sh spec: nodeGroups:
| ||||||||
You can track the synchronization status via the | bb-sync-file /etc/containerd/conf.d/ee-sandbox.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] sandbox_image = “registry.deckhouse.ru/deckhouse/ee@$EE_SANDBOX_IMAGE” EOF_TOML | ||||||||
shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w |
| ||||||||
Example output: | EOF | ||||||||
console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | Дождитесь появления файла | ||||||||
Also, the | Статус синхронизации можно отследить по значению | ||||||||
shell journalctl -u bashible -n 5 | shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | ||||||||
Example output: | Пример вывода: | ||||||||
console Aug 21 11:04:28 master-ce-to-ee-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ce-to-ee-0 bashible.sh[53407]: Annotate node master-ce-to-ee-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ce-to-ee-0 bashible.sh[53407]: Successful annotate node master-ce-to-ee-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ce-to-ee-0 systemd[1]: bashible.service: Deactivated successfully. | console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | ||||||||
| Также в журнале systemd-сервиса bashible должно появиться сообщение | ||||||||
shell
kubectl -n d8-system create secret generic deckhouse-registry | shell journalctl -u bashible -n 5 | ||||||||
| Пример вывода: | ||||||||
shell HANDLER=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.deckhouse.webhookHandler”) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/webhook-handler handler=registry.deckhouse.io/deckhouse/ee@$HANDLER | console Aug 21 11:04:28 master-ce-to-ee-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ce-to-ee-0 bashible.sh[53407]: Annotate node master-ce-to-ee-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ce-to-ee-0 bashible.sh[53407]: Successful annotate node master-ce-to-ee-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ce-to-ee-0 systemd[1]: bashible.service: Deactivated successfully. | ||||||||
|
| ||||||||
shell DECKHOUSE_KUBE_RBAC_PROXY=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.common.kubeRbacProxy”) DECKHOUSE_INIT_CONTAINER=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.common.init”) DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/deckhouse init-downloaded-modules=registry.deckhouse.io/deckhouse/ee@$DECKHOUSE_INIT_CONTAINER kube-rbac-proxy=registry.deckhouse.io/deckhouse/ee@$DECKHOUSE_KUBE_RBAC_PROXY deckhouse=registry.deckhouse.io/deckhouse/ee:$DECKHOUSE_VERSION | shell
kubectl -n d8-system create secret generic deckhouse-registry | ||||||||
|
| ||||||||
Use the following command to check the Deckhouse pod’s status: | shell HANDLER=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.deckhouse.webhookHandler”) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/webhook-handler handler=registry.deckhouse.ru/deckhouse/ee@$HANDLER | ||||||||
shell kubectl -n d8-system get po -l app=deckhouse |
| ||||||||
Use the following command to check the Deckhouse queue: | shell DECKHOUSE_KUBE_RBAC_PROXY=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.common.kubeRbacProxy”) DECKHOUSE_INIT_CONTAINER=$(kubectl exec ee-image – cat deckhouse/candi/images_digests.json | jq -r “.common.init”) DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/deckhouse init-downloaded-modules=registry.deckhouse.ru/deckhouse/ee@$DECKHOUSE_INIT_CONTAINER kube-rbac-proxy=registry.deckhouse.ru/deckhouse/ee@$DECKHOUSE_KUBE_RBAC_PROXY deckhouse=registry.deckhouse.ru/deckhouse/ee:$DECKHOUSE_VERSION | ||||||||
shell kubectl -n d8-system exec deploy/deckhouse -c deckhouse – deckhouse-controller queue list |
| ||||||||
| Посмотреть статус пода Deckhouse: | ||||||||
shell kubectl get pods -A -o json | jq -r ‘.items[] | select(.spec.containers[] | select(.image | contains(“deckhouse.io/deckhouse/ce”))) | .metadata.namespace + “\t” + .metadata.name’ | sort | uniq | shell kubectl -n d8-system get po -l app=deckhouse | ||||||||
| Проверить состояние очереди Deckhouse: | ||||||||
shell kubectl delete ngc containerd-ee-config.sh ee-set-sha-images.sh kubectl delete pod ee-image kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: del-temp-config.sh spec: nodeGroups:
| shell kubectl -n d8-system exec deploy/deckhouse -c deckhouse – deckhouse-controller queue list | ||||||||
Once bashible synchronization is complete (you can track the synchronization status on nodes via the |
| ||||||||
shell kubectl delete ngc del-temp-config.sh | shell kubectl get pods -A -o json | jq -r ‘.items[] | select(.spec.containers[] | select(.image | contains(“deckhouse.ru/deckhouse/ce”))) | .metadata.namespace + “\t” + .metadata.name’ | sort | uniq | ||||||||
How to Switch Deckhouse EE to SE? |
| ||||||||
You will need a valid license key. You can request a trial license key if necessary. | shell kubectl delete ngc containerd-ee-config.sh ee-set-sha-images.sh kubectl delete pod ee-image kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: del-temp-config.sh spec: nodeGroups:
| ||||||||
The instruction implies using the public address of the container registry: | После синхронизации bashible (статус синхронизации на узлах можно отследить по значению | ||||||||
The Deckhouse SE edition does not support certain cloud providers | shell kubectl delete ngc del-temp-config.sh | ||||||||
To switch Deckhouse Enterprise Edition to Standard Edition, follow these steps: | Как переключить Deckhouse EE на SE? | ||||||||
All commands should be executed on a master node of the existing cluster. | Для переключения вам потребуется действующий лицензионный ключ. При необходимости вы можете запросить временный ключ, нажав на кнопку Получить консультацию. | ||||||||
| В инструкции используется публичный адрес container registry: | ||||||||
shell
LICENSE_TOKEN= | В Deckhouse SE не поддерживается работа облачных провайдеров | ||||||||
| Ниже описаны шаги для переключения кластера Deckhouse Enterprise Edition на Standard Edition: | ||||||||
shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: containerd-se-config.sh spec: nodeGroups:
| Все команды выполняются на master-узле существующего кластера: | ||||||||
mkdir -p /etc/containerd/conf.d bb-sync-file /etc/containerd/conf.d/se-registry.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] [plugins.”io.containerd.grpc.v1.cri”.registry.configs] [plugins.”io.containerd.grpc.v1.cri”.registry.configs.”registry.deckhouse.io”.auth] auth = “$AUTH_STRING” EOF_TOML |
| ||||||||
EOF | shell
LICENSE_TOKEN= | ||||||||
Wait for the |
| ||||||||
shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: containerd-se-config.sh spec: nodeGroups:
| ||||||||
Example output: | mkdir -p /etc/containerd/conf.d bb-sync-file /etc/containerd/conf.d/se-registry.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] [plugins.”io.containerd.grpc.v1.cri”.registry.configs] [plugins.”io.containerd.grpc.v1.cri”.registry.configs.”registry.deckhouse.ru”.auth] auth = “$AUTH_STRING” EOF_TOML | ||||||||
console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | EOF | ||||||||
Also, the | Дождитесь появления файла | ||||||||
shell journalctl -u bashible -n 5 | shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | ||||||||
Example output: | Пример вывода: | ||||||||
console Aug 21 11:04:28 master-ee-to-se-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ee-to-se-0 bashible.sh[53407]: Annotate node master-ee-to-se-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master ee-to-se-0 bashible.sh[53407]: Successful annotate node master-ee-to-se-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-se-0 systemd[1]: bashible.service: Deactivated successfully. | console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | ||||||||
| Также в журнале systemd-сервиса bashible должно появиться сообщение | ||||||||
shell DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl run se-image –image=registry.deckhouse.io/deckhouse/se/install:$DECKHOUSE_VERSION –command sleep – infinity | shell journalctl -u bashible -n 5 | ||||||||
| Пример вывода: | ||||||||
| console Aug 21 11:04:28 master-ee-to-se-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ee-to-se-0 bashible.sh[53407]: Annotate node master-ee-to-se-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master ee-to-se-0 bashible.sh[53407]: Successful annotate node master-ee-to-se-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-se-0 systemd[1]: bashible.service: Deactivated successfully. | ||||||||
|
| ||||||||
shell SE_SANDBOX_IMAGE=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.common.pause”) | shell DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl run se-image –image=registry.deckhouse.ru/deckhouse/se/install:$DECKHOUSE_VERSION –command sleep – infinity | ||||||||
Check the result of the command to make sure it was successful: |
| ||||||||
shell echo $SE_SANDBOX_IMAGE |
| ||||||||
Example output: |
| ||||||||
console sha256:2a909cb9df4d0207f1fe5bd9660a0529991ba18ce6ce7b389dc008c05d9022d1 | shell SE_SANDBOX_IMAGE=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.common.pause”) | ||||||||
| Проверка: | ||||||||
shell SE_K8S_API_PROXY=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.controlPlaneManager.kubernetesApiProxy”) | shell echo $SE_SANDBOX_IMAGE | ||||||||
Check the result of the command to make sure it was successful: | Пример вывода: | ||||||||
shell echo $SE_K8S_API_PROXY | console sha256:2a909cb9df4d0207f1fe5bd9660a0529991ba18ce6ce7b389dc008c05d9022d1 | ||||||||
Example output: |
| ||||||||
console sha256:af92506a36f4bd032a6459295069f9478021ccf67d37557a664878bc467dd9fd | shell SE_K8S_API_PROXY=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.controlPlaneManager.kubernetesApiProxy”) | ||||||||
| Проверка: | ||||||||
shell SE_REGISTRY_PACKAGE_PROXY=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.registryPackagesProxy.registryPackagesProxy”) | shell echo $SE_K8S_API_PROXY | ||||||||
Run the command: | Пример вывода: | ||||||||
shell sudo /opt/deckhouse/bin/crictl pull registry.deckhouse.io/deckhouse/se@$SE_REGISTRY_PACKAGE_PROXY | console sha256:af92506a36f4bd032a6459295069f9478021ccf67d37557a664878bc467dd9fd | ||||||||
Example output: |
| ||||||||
console Image is up to date for sha256:7e9908d47580ed8a9de481f579299ccb7040d5c7fade4689cb1bff1be74a95de | shell SE_REGISTRY_PACKAGE_PROXY=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.registryPackagesProxy.registryPackagesProxy”) | ||||||||
| Затем выполните команду: | ||||||||
shell SE_MODULES=$(kubectl exec se-image – ls -l deckhouse/modules/ | grep -oE “\d.-\w” | awk {‘print $9’} | cut -c5-) | shell sudo /opt/deckhouse/bin/crictl pull registry.deckhouse.ru/deckhouse/se@$SE_REGISTRY_PACKAGE_PROXY | ||||||||
Check the result of the command to make sure it was successful: | Пример вывода: | ||||||||
shell echo $SE_MODULES | console Image is up to date for sha256:7e9908d47580ed8a9de481f579299ccb7040d5c7fade4689cb1bff1be74a95de | ||||||||
Example output: |
| ||||||||
console common priority-class deckhouse external-module-manager … | shell SE_MODULES=$(kubectl exec se-image – ls -l deckhouse/modules/ | grep -oE “\d.-\w” | awk {‘print $9’} | cut -c5-) | ||||||||
| Проверка: | ||||||||
shell USED_MODULES=$(kubectl get modules -o custom-columns=NAME:.metadata.name,SOURCE:.properties.source,STATE:.properties.state,ENABLED:.status.phase | grep Embedded | grep -E ‘Enabled|Ready’ | awk {‘print $1’}) | shell echo $SE_MODULES | ||||||||
Check the result of the command to make sure it was successful: | console common priority-class deckhouse external-module-manager … | ||||||||
shell echo $USED_MODULES |
| ||||||||
Example output: | shell USED_MODULES=$(kubectl get modules -o custom-columns=NAME:.metadata.name,SOURCE:.properties.source,STATE:.properties.state,ENABLED:.status.phase | grep Embedded | grep -E ‘Enabled|Ready’ | awk {‘print $1’}) | ||||||||
console admission-policy-engine cert-manager chrony … | Проверка: | ||||||||
| shell echo $USED_MODULES | ||||||||
shell MODULES_WILL_DISABLE=$(echo $USED_MODULES | tr ‘ ‘ ‘\n’ | grep -Fxv -f <(echo $SE_MODULES | tr ‘ ‘ ‘\n’)) | Пример вывода: | ||||||||
| console admission-policy-engine cert-manager chrony … | ||||||||
shell echo $MODULES_WILL_DISABLE |
| ||||||||
| shell MODULES_WILL_DISABLE=$(echo $USED_MODULES | tr ‘ ‘ ‘\n’ | grep -Fxv -f <(echo $SE_MODULES | tr ‘ ‘ ‘\n’)) | ||||||||
Disable the unsupported modules: |
| ||||||||
shell echo $MODULES_WILL_DISABLE | tr ‘ ‘ ‘\n’ | awk {‘print “kubectl -n d8-system exec deploy/deckhouse – deckhouse-controller module disable”,$1’} | bash | shell echo $MODULES_WILL_DISABLE | ||||||||
Wait until the Deckhouse pod is in the |
| ||||||||
| Отключите неподдерживаемые в SE-редакции модули: | ||||||||
shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: se-set-sha-images.sh spec: nodeGroups:
| shell echo $MODULES_WILL_DISABLE | tr ‘ ‘ ‘\n’ | awk {‘print “kubectl -n d8-system exec deploy/deckhouse – deckhouse-controller module disable”,$1’} | bash | ||||||||
bb-sync-file /etc/containerd/conf.d/se-sandbox.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] sandbox_image = “registry.deckhouse.io/deckhouse/se@$SE_SANDBOX_IMAGE” EOF_TOML | Дождитесь, пока под Deckhouse перейдёт в состояние | ||||||||
|
| ||||||||
EOF | shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: se-set-sha-images.sh spec: nodeGroups:
| ||||||||
Wait for the | bb-sync-file /etc/containerd/conf.d/se-sandbox.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] sandbox_image = “registry.deckhouse.ru/deckhouse/se@$SE_SANDBOX_IMAGE” EOF_TOML | ||||||||
You can track the synchronization status via the |
| ||||||||
shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | EOF | ||||||||
Example output: | Дождитесь появления файла | ||||||||
console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | Статус синхронизации можно отследить по значению | ||||||||
Also, the | shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | ||||||||
shell journalctl -u bashible -n 5 | Пример вывода: | ||||||||
Example output: | console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | ||||||||
console Aug 21 11:04:28 master-ee-to-se-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ee-to-se-0 bashible.sh[53407]: Annotate node master-ee-to-se-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master ee-to-se-0 bashible.sh[53407]: Successful annotate node master-ee-to-se-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-se-0 systemd[1]: bashible.service: Deactivated successfully. | Также в журнале systemd-сервиса bashible должно появиться сообщение | ||||||||
| shell journalctl -u bashible -n 5 | ||||||||
shell
kubectl -n d8-system create secret generic deckhouse-registry | Пример вывода: | ||||||||
| console Aug 21 11:04:28 master-ee-to-se-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ee-to-se-0 bashible.sh[53407]: Annotate node master-ee-to-se-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master ee-to-se-0 bashible.sh[53407]: Successful annotate node master-ee-to-se-0 with annotation node.deckhouse.io/ configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-se-0 systemd[1]: bashible.service: Deactivated successfully. | ||||||||
shell HANDLER=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.deckhouse.webhookHandler”) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/webhook-handler handler=registry.deckhouse.io/deckhouse/se@$HANDLER |
| ||||||||
| shell
kubectl -n d8-system create secret generic deckhouse-registry | ||||||||
shell DECKHOUSE_KUBE_RBAC_PROXY=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.common.kubeRbacProxy”) DECKHOUSE_INIT_CONTAINER=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.common.init”) DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/deckhouse init-downloaded-modules=registry.deckhouse.io/deckhouse/se@$DECKHOUSE_INIT_CONTAINER kube-rbac-proxy=registry.deckhouse.io/deckhouse/se@$DECKHOUSE_KUBE_RBAC_PROXY deckhouse=registry.deckhouse.io/deckhouse/se:$DECKHOUSE_VERSION |
| ||||||||
| shell HANDLER=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.deckhouse.webhookHandler”) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/webhook-handler handler=registry.deckhouse.ru/deckhouse/se@$HANDLER | ||||||||
|
| ||||||||
Use the following command to check the Deckhouse pod’s status: | shell DECKHOUSE_KUBE_RBAC_PROXY=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.common.kubeRbacProxy”) DECKHOUSE_INIT_CONTAINER=$(kubectl exec se-image – cat deckhouse/candi/images_digests.json | jq -r “.common.init”) DECKHOUSE_VERSION=$(kubectl -n d8-system get deploy deckhouse -ojson | jq -r ‘.spec.template.spec.containers[] | select(.name == “deckhouse”) | .image’ | awk -F: ‘{print $2}’) kubectl –as=system:serviceaccount:d8-system:deckhouse -n d8-system set image deployment/deckhouse init-downloaded-modules=registry.deckhouse.ru/deckhouse/se@$DECKHOUSE_INIT_CONTAINER kube-rbac-proxy=registry.deckhouse.ru/deckhouse/se@$DECKHOUSE_KUBE_RBAC_PROXY deckhouse=registry.deckhouse.ru/deckhouse/se:$DECKHOUSE_VERSION | ||||||||
shell kubectl -n d8-system get po -l app=deckhouse |
| ||||||||
Use the following command to check the Deckhouse queue: |
| ||||||||
shell kubectl -n d8-system exec deploy/deckhouse -c deckhouse – deckhouse-controller queue list | Посмотреть статус пода Deckhouse: | ||||||||
| shell kubectl -n d8-system get po -l app=deckhouse | ||||||||
shell kubectl get pods -A -o json | jq -r ‘.items[] | select(.status.phase==”Running” or .status.phase==”Pending” or .status.phase==”PodInitializing”) | select(.spec.containers[] | select(.image | contains(“deckhouse.io/deckhouse/ee”))) | .metadata.namespace + “\t” + .metadata.name’ | sort | uniq | Проверить состояние очереди Deckhouse: | ||||||||
| shell kubectl -n d8-system exec deploy/deckhouse -c deckhouse – deckhouse-controller queue list | ||||||||
shell kubectl delete ngc containerd-se-config.sh se-set-sha-images.sh kubectl delete pod se-image kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: del-temp-config.sh spec: nodeGroups:
|
| ||||||||
Once bashible synchronization is complete (you can track the synchronization status on nodes via the | shell kubectl get pods -A -o json | jq -r ‘.items[] | select(.status.phase==”Running” or .status.phase==”Pending” or .status.phase==”PodInitializing”) | select(.spec.containers[] | select(.image | contains(“deckhouse.ru/deckhouse/ee”))) | .metadata.namespace + “\t” + .metadata.name’ | sort | uniq | ||||||||
shell kubectl delete ngc del-temp-config.sh |
| ||||||||
How do I get access to Deckhouse controller in multimaster cluster? | shell kubectl delete ngc containerd-se-config.sh se-set-sha-images.sh kubectl delete pod se-image kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: del-temp-config.sh spec: nodeGroups:
| ||||||||
In clusters with multiple master nodes Deckhouse runs in high availability mode (in several instances). To access the active Deckhouse controller, you can use the following command (as an example of the command | После завершения синхронизации bashible (статус синхронизации на узлах отображается по значению | ||||||||
shell kubectl -n d8-system exec -it svc/deckhouse-leader -c deckhouse – deckhouse-controller queue list | shell kubectl delete ngc del-temp-config.sh | ||||||||
How do I upgrade the Kubernetes version in a cluster? | Как переключить Deckhouse EE на CSE? | ||||||||
To upgrade the Kubernetes version in a cluster change the kubernetesVersion parameter in the ClusterConfiguration structure by making the following steps: |
| ||||||||
| Для переключения кластера Deckhouse Enterprise Edition на Certified Security Edition выполните следующие действия (все команды выполняются на master-узле кластера от имени пользователя с настроенным контекстом | ||||||||
shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller edit cluster-configuration |
| ||||||||
| shell kubectl -n d8-system exec -ti svc/deckhouse-leader -c deckhouse – deckhouse-controller edit cluster-configuration | ||||||||
How do I run Deckhouse on a particular node? |
| ||||||||
Set the |
| ||||||||
Use only nodes with the CloudStatic or Static type to run Deckhouse. Also, avoid using a | shell
LICENSE_TOKEN=
| ||||||||
Here is an example of the module configuration: | mkdir -p /etc/containerd/conf.d bb-sync-file /etc/containerd/conf.d/cse-registry.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] [plugins.”io.containerd.grpc.v1.cri”.registry] [plugins.”io.containerd.grpc.v1.cri”.registry.mirrors] [plugins.”io.containerd.grpc.v1.cri”.registry.mirrors.”registry-cse.deckhouse.ru”] endpoint = [“https://registry-cse.deckhouse.ru”] [plugins.”io.containerd.grpc.v1.cri”.registry.configs] [plugins.”io.containerd.grpc.v1.cri”.registry.configs.”registry-cse.deckhouse.ru”.auth] auth = “$AUTH_STRING” EOF_TOML EOF | ||||||||
yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: nodeSelector: node-role.deckhouse.io/deckhouse: “” | Дождитесь появления файла на узлах и завершения синхронизации bashible: | ||||||||
shell /etc/containerd/conf.d/cse-registry.toml | |||||||||
Статус синхронизации можно отследить по значению | |||||||||
shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | |||||||||
Пример вывода: | |||||||||
console NAME NODES READY UPTODATE master 1 1 1 worker 2 2 2 | |||||||||
В журнале systemd-сервиса bashible должно появиться сообщение | |||||||||
shell journalctl -u bashible -n 5 | |||||||||
Пример вывода: | |||||||||
console Aug 21 11:04:28 master-ee-to-cse-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ee-to-cse-0 bashible.sh[53407]: Annotate node master-ee-to-cse-0 with annotation node.deckhouse.io/configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-cse-0 bashible.sh[53407]: Successful annotate node master-ee-to-cse-0 with annotation node.deckhouse.io/configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-cse-0 systemd[1]: bashible.service: Deactivated successfully. | |||||||||
| |||||||||
shell DECKHOUSE_VERSION=v<ВЕРСИЯ_DECKHOUSE_CSE> Например, DECKHOUSE_VERSION=v1.58.2 kubectl run cse-image --image=registry-cse.deckhouse.ru/deckhouse/cse/install:$DECKHOUSE_VERSION --command sleep -- infinityВЕРСИЯ_DECKHOUSE_CSE> | |||||||||
Как только под перейдёт в статус | |||||||||
shell CSE_SANDBOX_IMAGE=$(kubectl exec cse-image – cat deckhouse/candi/images_digests.json | grep pause | grep -oE ‘sha256:\w’) CSE_K8S_API_PROXY=$(kubectl exec cse-image – cat deckhouse/candi/images_digests.json | grep kubernetesApiProxy | grep -oE ‘sha256:\w’) CSE_MODULES=$(kubectl exec cse-image – ls -l deckhouse/modules/ | awk {‘print $9’} |grep -oP “\d.-\w” | cut -c5-) USED_MODULES=$(kubectl get modules -o custom-columns=NAME:.metadata.name,SOURCE:.properties.source,STATE:.properties.state,ENABLED:.status.phase | grep Embedded | grep -E ‘Enabled|Ready’ | awk {‘print $1’}) MODULES_WILL_DISABLE=$(echo $USED_MODULES | tr ‘ ‘ ‘\n’ | grep -Fxv -f <(echo $CSE_MODULES | tr ‘ ‘ ‘\n’)) CSE_DECKHOUSE_KUBE_RBAC_PROXY=$(kubectl exec cse-image – cat deckhouse/candi/images_digests.json | jq -r “.common.kubeRbacProxy”) | |||||||||
| |||||||||
| |||||||||
Отобразить список модулей, которые не поддерживаются в Deckhouse CSE и будут отключены, можно следующей командой: | |||||||||
shell echo $MODULES_WILL_DISABLE | |||||||||
| |||||||||
Отключите неподдерживаемые в Deckhouse CSE модули: | |||||||||
shell echo $MODULES_WILL_DISABLE | tr ‘ ‘ ‘\n’ | awk {‘print “kubectl -n d8-system exec deploy/deckhouse – deckhouse-controller module disable”,$1’} | bash | |||||||||
На данный момент в Deckhouse CSE версий | |||||||||
Дождитесь перехода пода Deckhouse в статус | |||||||||
shell kubectl -n d8-system exec -it svc/deckhouse-leader -c deckhouse – deckhouse-controller queue list | |||||||||
Проверьте, что отключенные модули перешли в состояние | |||||||||
shell kubectl get modules | |||||||||
| |||||||||
shell kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: cse-set-sha-images.sh spec: nodeGroups:
| |||||||||
bb-sync-file /etc/containerd/conf.d/cse-sandbox.toml - containerd-config-file-changed « “EOF_TOML” [plugins] [plugins.”io.containerd.grpc.v1.cri”] sandbox_image = “registry-cse.deckhouse.ru/deckhouse/cse@$CSE_SANDBOX_IMAGE” EOF_TOML | |||||||||
sed -i ‘s|image: .|image: registry-cse.deckhouse.ru/deckhouse/cse@$CSE_K8S_API_PROXY|’ /var/lib/bashible/bundle_steps/051_pull_and_configure_kubernetes_api_proxy.sh sed -i ‘s|crictl pull .|crictl pull registry-cse.deckhouse.ru/deckhouse/cse@$CSE_K8S_API_PROXY|’ /var/lib/bashible/bundle_steps/051_pull_and_configure_kubernetes_api_proxy.sh EOF | |||||||||
Дождитесь завершения синхронизации bashible на всех узлах. | |||||||||
Состояние синхронизации можно отследить по значению | |||||||||
shell kubectl get ng -o custom-columns=NAME:.metadata.name,NODES:.status.nodes,READY:.status.ready,UPTODATE:.status.upToDate -w | |||||||||
В журнале systemd-сервиса bashible на узлах должно появиться сообщение | |||||||||
shell journalctl -u bashible -n 5 | |||||||||
Пример вывода: | |||||||||
console Aug 21 11:04:28 master-ee-to-cse-0 bashible.sh[53407]: Configuration is in sync, nothing to do. Aug 21 11:04:28 master-ee-to-cse-0 bashible.sh[53407]: Annotate node master-ee-to-cse-0 with annotation node.deckhouse.io/configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-cse-0 bashible.sh[53407]: Successful annotate node master-ee-to-cse-0 with annotation node.deckhouse.io/configuration-checksum=9cbe6db6c91574b8b732108a654c99423733b20f04848d0b4e1e2dadb231206a Aug 21 11:04:29 master-ee-to-cse-0 systemd[1]: bashible.service: Deactivated successfully. | |||||||||
| |||||||||
shell
kubectl -n d8-system create secret generic deckhouse-registry | |||||||||
| |||||||||
Команда для Deckhouse CSE версии | |||||||||
shell kubectl -n d8-system set image deployment/deckhouse kube-rbac-proxy=registry-cse.deckhouse.ru/deckhouse/cse@$CSE_DECKHOUSE_KUBE_RBAC_PROXY deckhouse=registry-cse.deckhouse.ru/deckhouse/cse:$DECKHOUSE_VERSION | |||||||||
Команда для Deckhouse CSE версии | |||||||||
shell kubectl -n d8-system set image deployment/deckhouse init-downloaded-modules=registry-cse.deckhouse.ru/deckhouse/cse@$CSE_DECKHOUSE_INIT_CONTAINER kube-rbac-proxy=registry-cse.deckhouse.ru/deckhouse/cse@$CSE_DECKHOUSE_KUBE_RBAC_PROXY deckhouse=registry-cse.deckhouse.ru/deckhouse/cse:$DECKHOUSE_VERSION | |||||||||
| |||||||||
Посмотреть статус пода Deckhouse: | |||||||||
shell kubectl -n d8-system get po -l app=deckhouse | |||||||||
Проверить состояние очереди Deckhouse: | |||||||||
shell kubectl -n d8-system exec deploy/deckhouse -c deckhouse – deckhouse-controller queue list | |||||||||
| |||||||||
shell kubectl get pods -A -o json | jq -r ‘.items[] | select(.spec.containers[] | select(.image | contains(“deckhouse.ru/deckhouse/ee”))) | .metadata.namespace + “\t” + .metadata.name’ | sort | uniq | |||||||||
Если в выводе присутствуют поды модуля chrony, заново включите данный модуль (в Deckhouse CSE этот модуль по умолчанию выключен): | |||||||||
shell kubectl -n d8-system exec deploy/deckhouse – deckhouse-controller module enable chrony | |||||||||
| |||||||||
shell rm /tmp/cse-deckhouse-registry.yaml | |||||||||
kubectl delete ngc containerd-cse-config.sh cse-set-sha-images.sh | |||||||||
kubectl delete pod cse-image | |||||||||
kubectl apply -f - «EOF apiVersion: deckhouse.io/v1alpha1 kind: NodeGroupConfiguration metadata: name: del-temp-config.sh spec: nodeGroups:
| |||||||||
После синхронизации bashible (статус синхронизации на узлах можно отследить по значению | |||||||||
shell kubectl delete ngc del-temp-config.sh | |||||||||
Как получить доступ к контроллеру Deckhouse в multi-master-кластере? | |||||||||
В кластерах с несколькими master-узлами Deckhouse запускается в режиме высокой доступности (в нескольких экземплярах). Для доступа к активному контроллеру Deckhouse можно использовать следующую команду (на примере команды | |||||||||
shell kubectl -n d8-system exec -it svc/deckhouse-leader -c deckhouse – deckhouse-controller queue list | |||||||||
Как обновить версию Kubernetes в кластере? | |||||||||
Чтобы обновить версию Kubernetes в кластере, измените параметр kubernetesVersion в структуре ClusterConfiguration, выполнив следующие шаги: | |||||||||
| |||||||||
shell
kubectl -n d8-system exec -ti svc/deckhouse-leader | |||||||||
| |||||||||
Как запускать Deckhouse на произвольном узле? | |||||||||
Для запуска Deckhouse на произвольном узле установите у модуля | |||||||||
Используйте для запуска Deckhouse только узлы с типом CloudStatic или Static. Также избегайте использования для запуска Deckhouse группы узлов ( | |||||||||
Пример конфигурации модуля: | |||||||||
yaml apiVersion: deckhouse.io/v1alpha1 kind: ModuleConfig metadata: name: deckhouse spec: version: 1 settings: nodeSelector: node-role.deckhouse.io/deckhouse: “” |