Compare commits

...
5 Commits
Author SHA1 Message Date
ITQandGitHub 6f1e2e2be4 chore(): updated kubeapi listener port 2026-09-17 19:52:41 +03:00
ITQ f75a407559 fix(): fixed healthcheck intervals 2026-09-05 19:14:47 +03:00
ITQ afc0ee67a6 chore(): improved cmdline 2026-09-05 16:45:27 +03:00
ITQ 80d2aa9d52 chore(): updated main master name 2026-09-05 11:29:47 +03:00
ITQ 9e407d7fc2 chore(): update hostnames to match fqdns 2026-08-18 23:39:12 +03:00
5 changed files with 30 additions and 24 deletions
@@ -60,19 +60,22 @@ runcmd:
--disable coredns,traefik,local-storage,metrics-server,runtimes \
--disable-network-policy \
--disable-kube-proxy \
--disable-cloud-controller \
--disable-helm-controller \
--flannel-backend none \
--egress-selector-mode agent \
--servicelb-namespace kube-system \
--nonroot-devices \
--secrets-encryption \
--secrets-encryption-provider secretbox \
--lb-server-port 6444 \
--etcd-expose-metrics \
--write-kubeconfig-mode 0600 \
--write-kubeconfig-group root \
--write-kubeconfig ${k3s_dir}/kubeconfig/config \
--image-credential-provider-bin-dir /var/lib/rancher/credentialprovider/bin \
--image-credential-provider-config /var/lib/rancher/credentialprovider/config.yaml \
--data-dir=${k3s_dir} \
--default-local-storage-path=${k3s_dir}/storage" sh -
--data-dir=${k3s_dir}" sh -
- |
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- |
@@ -59,19 +59,22 @@ runcmd:
--disable coredns,traefik,local-storage,metrics-server,runtimes \
--disable-network-policy \
--disable-kube-proxy \
--disable-cloud-controller \
--disable-helm-controller \
--flannel-backend none \
--egress-selector-mode agent \
--servicelb-namespace kube-system \
--nonroot-devices \
--secrets-encryption \
--secrets-encryption-provider secretbox \
--lb-server-port 6444 \
--etcd-expose-metrics \
--write-kubeconfig-mode 0600 \
--write-kubeconfig-group root \
--write-kubeconfig ${k3s_dir}/kubeconfig/config \
--image-credential-provider-bin-dir /var/lib/rancher/credentialprovider/bin \
--image-credential-provider-config /var/lib/rancher/credentialprovider/config.yaml \
--data-dir=${k3s_dir} \
--default-local-storage-path=${k3s_dir}/storage" sh -
--data-dir=${k3s_dir}" sh -
- |
mkdir -p /home/ubuntu/.kube
cp ${k3s_dir}/kubeconfig/config /home/ubuntu/.kube/config
+1 -1
View File
@@ -10,7 +10,7 @@ resource "terraform_data" "k8s_main_master_user_data" {
}
resource "yandex_compute_instance" "k8s_main_master" {
name = "k8s-master"
name = "master-0-ru-central1-d-k8s"
hostname = local.k8s_main_master_fqdn
description = "Salt, ansible and kubernetes master, provisions other nodes"
platform_id = "standard-v3"
+10 -10
View File
@@ -9,7 +9,7 @@ resource "yandex_compute_instance_group" "k8s_master" {
}
instance_template {
name = "k8s-master-{instance.index_in_zone}-{instance.zone_id}"
name = "master-{instance.index_in_zone}-{instance.zone_id}-k8s"
hostname = "master-{instance.index_in_zone}.{instance.zone_id}.k8s.internal"
labels = {
"instance-group" = "master"
@@ -105,10 +105,10 @@ resource "yandex_compute_instance_group" "k8s_master" {
ignore_health_checks = true
}
health_check {
healthy_threshold = 2
unhealthy_threshold = 2
interval = 2
timeout = 1
healthy_threshold = 3
unhealthy_threshold = 3
interval = 10
timeout = 9
tcp_options {
port = 6443
@@ -135,7 +135,7 @@ resource "yandex_compute_instance_group" "k8s_worker" {
}
instance_template {
name = "k8s-worker-{instance.index_in_zone}-{instance.zone_id}"
name = "worker-{instance.index_in_zone}-{instance.zone_id}-k8s"
hostname = "worker-{instance.index_in_zone}.{instance.zone_id}.k8s.internal"
labels = {
"instance-group" = "worker"
@@ -230,10 +230,10 @@ resource "yandex_compute_instance_group" "k8s_worker" {
ignore_health_checks = true
}
health_check {
healthy_threshold = 2
unhealthy_threshold = 2
interval = 2
timeout = 1
healthy_threshold = 3
unhealthy_threshold = 3
interval = 10
timeout = 9
tcp_options {
port = 80
+1 -1
View File
@@ -5,7 +5,7 @@ resource "yandex_lb_network_load_balancer" "k8s_lb" {
listener {
name = "kubeapi"
port = 6443
port = 8443
external_address_spec {
address = yandex_vpc_address.nlb.external_ipv4_address[0].address
ip_version = "ipv4"