Compare languages | The deckhouse module: FAQ

How to run kube-bench in my cluster?

Как запустить kube-bench в кластере?

First, you have to exec in Deckhouse Pod:

Вначале необходимо зайти внутрь пода Deckhouse:

shell kubectl -n d8-system exec -ti deploy/deckhouse – bash

shell kubectl -n d8-system exec -ti deploy/deckhouse – bash

Then you have to select which node you want to run kube-bench.

Далее необходимо выбрать, на каком узле запустить kube-bench.

  • Run on random node:
  • Запуск на случайном узле:

shell curl -s https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml | kubectl create -f -

shell curl -s https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml | kubectl create -f -

  • Run on specific node, e.g. control-plane node:
  • Запуск на конкретном узле, например на control-plane:

shell curl -s https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml | yq r - -j | jq ‘.spec.template.spec.tolerations=[{“operator”: “Exists”}] | .spec.template.spec.nodeSelector={“node-role.kubernetes.io/control-plane”: “”}’ | kubectl create -f -

shell curl -s https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml | yq r - -j | jq ‘.spec.template.spec.tolerations=[{“operator”: “Exists”}] | .spec.template.spec.nodeSelector={“node-role.kubernetes.io/control-plane”: “”}’ | kubectl create -f -

Then you can check report:

Далее можно проверить результат выполнения:

shell kubectl logs job.batch/kube-bench

shell kubectl logs job.batch/kube-bench

How to collect debug info?

Как собрать информацию для отладки?

We always appreciate helping users with debugging complex issues. Please follow these steps so that we can help you:

Мы всегда рады помочь пользователям с расследованием сложных проблем. Пожалуйста, выполните следующие шаги, чтобы мы смогли вам помочь:

  1. Collect all the necessary information by running the following command:
  1. Выполните следующую команду, чтобы собрать необходимые данные:

sh kubectl -n d8-system exec deploy/deckhouse -c deckhouse
– deckhouse-controller collect-debug-info \

deckhouse-debug-$(date +”%Y_%m_%d”).tar.gz

sh kubectl -n d8-system exec deploy/deckhouse -c deckhouse
– deckhouse-controller collect-debug-info \

deckhouse-debug-$(date +”%Y_%m_%d”).tar.gz

  1. Send the archive to the Deckhouse team for further debugging.
  1. Отправьте получившийся архив команде Deckhouse для дальнейшего расследования.

Data that will be collected:

  • Deckhouse queue state
  • global Deckhouse values (without any sensitive data)
  • enabled modules list
  • events from all namespaces
  • controllers and pods manifests from namespaces owned by Deckhouse
  • nodegroups state
  • nodes state
  • machines state
  • deckhouse pods version
  • all deckhousereleases objects
  • Deckhouse logs
  • machine controller manager logs
  • cloud controller manager logs
  • cluster autoscaler logs
  • Vertical Pod Autoscaler admission controller logs
  • Vertical Pod Autoscaler recommender logs
  • Vertical Pod Autoscaler updater logs
  • Prometheus logs
  • terraform-state-exporter metrics
  • all firing alerts from Prometheus

Данные, которые будут собраны:

  • состояние очереди Deckhouse;
  • Deckhouse values (без каких-либо конфиденциальных данных);
  • список включенных модулей;
  • events из всех пространств имен;
  • манифесты controller’ов и подов из всех пространств имен Deckhouse;
  • все объекты nodegroups;
  • все объекты nodes;
  • все объекты machines;
  • данные о текущей версии пода deckhouse;
  • все объекты deckhousereleases;
  • логи Deckhouse;
  • логи machine controller manager;
  • логи cloud controller manager;
  • логи cluster autoscaler;
  • логи Vertical Pod Autoscaler admission controller;
  • логи Vertical Pod Autoscaler recommender;
  • логи Vertical Pod Autoscaler updater;
  • логи Prometheus;
  • метрики terraform-state-exporter;
  • все горящие уведомления в Prometheus.

How to debug pod problems with ephemeral containers?

Как отлаживать проблемы в подах с помощью ephemeral containers?

Run the following command:

Выполните следующую команду:

shell kubectl -n debug -it --image=ubuntu

shell kubectl -n debug -it --image=ubuntu

More info in official documentation.

Подробнее можно почитать в официальной документации.

How to debug node problems with ephemeral containers?

Как отлаживать проблемы на узлах с помощью ephemeral containers?

Run the following command:

Выполните следующую команду:

shell kubectl debug node/mynode -it –image=ubuntu

shell kubectl debug node/mynode -it –image=ubuntu

More info in official documentation.

Подробнее можно почитать в официальной документации.