Compare languages | Cloud provider — AWS: FAQ

How do I create a peering connection between VPCs?

Как поднять пиринговое соединение между VPC?

Let’s, for example, create a peering connection between two VPCs, vpc-a and vpc-b.

Для примера рассмотрим настройку пирингового соединения между двумя условными VPC — vpc-a и vpc-b.

Caution! IPv4 CIDR must be unique for each VPC.

Важно! IPv4 CIDR у обоих VPC должен различаться.

To configure, follow these steps:

Для настройки выполните следующие шаги:

  1. Switch to the region where vpc-a is running.
  2. CLick VPC -> VPC Peering Connections -> Create Peering Connection and then configure a peering connection:
    • Name: vpc-a-vpc-b.
    • Fill in Local and Another VPC fields.
  3. Switch to the region where vpc-b is running.
  4. Click VPC -> VPC Peering Connections.
  5. Select the newly created perring connection and click Action "Accept Request".
  6. Add routes to vpc-b’s CIDR over a peering connection to the vpc-a’s routing tables.
  7. Add routes to vpc-a’s CIDR over a peering connection to the vpc-b’s routing tables.
  1. Перейдите в регион, где работает vpc-a.
  2. Нажмите VPC -> VPC Peering Connections -> Create Peering Connection и настройте пиринговое соединение:
    • Name: vpc-a-vpc-b.
    • Заполните Local и Another VPC.
  3. Перейдите в регион, где работает vpc-b.
  4. Нажмите VPC -> VPC Peering Connections.
  5. Выделите созданное соединение и выберите Action "Accept Request".
  6. Для vpc-a добавьте во все таблицы маршрутизации маршруты до CIDR vpc-b через пиринговое соединение.
  7. Для vpc-b добавьте во все таблицы маршрутизации маршруты до CIDR vpc-a через пиринговое соединение.

How do I create a cluster in a new VPC with access over an existing bastion host?

Как создать кластер в новом VPC с доступом через имеющийся bastion-хост?

  1. Bootstrap the base-infrastructure of the cluster:
  1. Выполнить bootstrap базовой инфраструктуры кластера:

shell dhctl bootstrap-phase base-infra –config config

shell dhctl bootstrap-phase base-infra –config config

  1. Set up a peering connection using the instructions above.
  1. Поднять пиринговое соединение по инструкции выше.
  1. Continue installing the cluster, enter y when asked about the Terraform cache:
  1. Продолжить установку кластера. На вопрос про кэш Terraform ответить y:

shell dhctl bootstrap –config config –ssh-…

shell dhctl bootstrap –config config –ssh-…

How do I create a cluster in a new VPC and set up bastion host to access the nodes?

Как создать кластер в новом VPC и развернуть bastion-хост для доступа к узлам?

  1. Bootstrap the base-infrastructure of the cluster:
  1. Выполнить bootstrap базовой инфраструктуры кластера:

shell dhctl bootstrap-phase base-infra –config config

shell dhctl bootstrap-phase base-infra –config config

  1. Manually set up the bastion host in the subnet -public-0.
  1. Запустить вручную bastion-хост в subnet -public-0.
  1. Continue installing the cluster, enter y when asked about the Terraform cache:
  1. Продолжить установку кластера. На вопрос про кэш Terraform ответить y:

shell dhctl bootstrap –config config –ssh-…

shell dhctl bootstrap –config config –ssh-…

Configuring a bastion host

Особенности настройки bastion

There are two possible cases:

  • A bastion host already exists in an external VPC; in this case, you need to:
    1. Create a basic infrastructure of the cluster: dhctl bootstrap-phase base-infra;
    2. Set up peering connection between an external and a newly created VPC;
    3. Continue the installation by specifying the bastion host: dhctl bootstrap --ssh-bastion...
  • A bastion host needs to be deployed to a newly created VPC; in this case, you need to:
    1. Create a basic infrastructure of the cluster: dhctl bootstrap-phase base-infra;
    2. Manually run a bastion in the -public-0 subnet;
    3. Continue the installation by specifying the bastion host: dhctl bootstrap --ssh-bastion...

Поддерживаются сценарии:

  • bastion-хост уже создан во внешней VPC:
    1. Создайте базовую инфраструктуру кластера — dhctl bootstrap-phase base-infra.
    2. Настройте пиринговое соединение между внешней и свежесозданной VPC.
    3. Продолжите установку с указанием bastion-хоста — dhctl bootstrap --ssh-bastion....
  • bastion-хост требуется поставить в свежесозданной VPC:
    1. Создайте базовую инфраструктуру кластера — dhctl bootstrap-phase base-infra.
    2. Запустите вручную bastion-хост в subnet -public-0.
    3. Продолжите установку с указанием bastion-хоста — dhctl bootstrap --ssh-bastion....

Adding CloudStatic nodes to a cluster

Добавление CloudStatic-узлов в кластер

To add a pre-created VM as a node to a cluster, follow these steps:

Для добавления виртуальной машины в качестве узла в кластер выполните следующие шаги:

  1. Attach a security group <prefix>-node to the virtual machine.
  2. Attach the IAM role <prefix>-node to the virtual machine.
  3. Add the following tags to the virtual machine (so that cloud-controller-manager can find virtual machines in the cloud):
  1. Прикрепите группу безопасности <prefix>-node к виртуальной машине.
  2. Прикрепите IAM-роль <prefix>-node к виртуальной машине.
  3. Укажите следующие теги у виртуальной машины (чтобы cloud-controller-manager смог найти виртуальные машины в облаке):

text “kubernetes.io/cluster/" = "shared" "kubernetes.io/cluster/" = "shared"

text “kubernetes.io/cluster/" = "shared" "kubernetes.io/cluster/" = "shared"

  • You can find out the cluster_uuid using the command:
  • Узнать cluster_uuid можно с помощью команды:

shell kubectl -n kube-system get cm d8-cluster-uuid -o json | jq -r ‘.data.”cluster-uuid”’

shell kubectl -n kube-system get cm d8-cluster-uuid -o json | jq -r ‘.data.”cluster-uuid”’

  • You can find out prefix using the command:
  • Узнать prefix можно с помощью команды:

shell kubectl -n kube-system get secret d8-cluster-configuration -o json | jq -r ‘.data.”cluster-configuration.yaml”’
| base64 -d | grep prefix

shell kubectl -n kube-system get secret d8-cluster-configuration -o json | jq -r ‘.data.”cluster-configuration.yaml”’
| base64 -d | grep prefix

How to increase the size of a volume?

Как увеличить размер volume в кластере?

Set the new size in the corresponding PersistentVolumeClaim resource, in the spec.resources.requests.storage parameter.

Задайте новый размер в соответствующем ресурсе PersistentVolumeClaim в параметре spec.resources.requests.storage.

The operation is fully automatic and takes up to one minute. No further action is required.

Операция проходит полностью автоматически и занимает до одной минуты. Никаких дополнительных действий не требуется.

The progress of the process can be observed in events using the command kubectl describe pvc.

За ходом процесса можно наблюдать в events через команду kubectl describe pvc.

After modifying a volume, you must wait at least six hours and ensure that the volume is in the in-use or available state before you can modify the same volume. This is sometimes referred to as a cooldown period. You can find details in the official documentation.

После изменения volume нужно подождать не менее шести часов и убедиться, что volume находится в состоянии in-use или available, прежде чем станет возможно изменить его еще раз. Подробности можно найти в официальной документации.