ubicloud/rhizome/kubernetes/bin/join-worker-node
Eren Başak bc4bb849b1 Introduce Kubernetes Nodepools
This change adds the concept of Kubernetes Nodepools.

Each kubernetes nodepool is a set of VMs that act as the nodes that run
the actual application workloads.

A cluster have multiple nodepools with different size and
characteristics. The logic in this PR is also implemented this way.
However, product-wise, we may hide this feature for now and default to a
single nodepool.

A kubernetes cluster without a nodepool is kinda useless at this point.

Nodepools should be created separately from the cluster. However, a
nodepool nexus strand would wait until its cluster is stable.

Co-authored-by: Eren Başak <eren@ubicloud.com>
Co-authored-by: mohi-kalantari <mohi.kalantari1@gmail.com>
2025-01-17 15:17:24 +03:00

14 lines
381 B
Ruby
Executable file

#!/bin/env ruby
# frozen_string_literal: true
require_relative "../../common/lib/util"
if ARGV.count != 3
fail "Wrong number of arguments. Expected 3, Given #{ARGV.count}"
end
cluster_endpoint = ARGV[0]
token = ARGV[1]
discovery_token_ca_cert_hash = ARGV[2]
r "kubeadm join #{cluster_endpoint} --token #{token} --discovery-token-ca-cert-hash #{discovery_token_ca_cert_hash}"