Files
ubicloud/rhizome/kubernetes/bin/join-control-plane-node
Eren Başak d35ca0ce55 Introduce Ubicni for establishing intra-cluster network connectivity
Ubicni is our CNI plugin for kubernetes that allows intra-cluster network
communication within a kubernetes cluster on top of Ubicloud network stack.

Co-authored-by: Eren Başak <eren@ubicloud.com>
Co-authored-by: mohi-kalantari <mohi.kalantari1@gmail.com>
2025-02-04 08:56:06 +01:00

22 lines
665 B
Ruby
Executable File

#!/bin/env ruby
# frozen_string_literal: true
require "json"
require_relative "../../common/lib/util"
params = JSON.parse($stdin.read)
begin
cluster_endpoint = params.fetch("cluster_endpoint")
join_token = params.fetch("join_token")
discovery_token_ca_cert_hash = params.fetch("discovery_token_ca_cert_hash")
certificate_key = params.fetch("certificate_key")
rescue KeyError => e
puts "Needed #{e.key} in parameters"
exit 1
end
r "kubeadm join #{cluster_endpoint} --control-plane --token #{join_token} --discovery-token-ca-cert-hash #{discovery_token_ca_cert_hash} --certificate-key #{certificate_key}"
r("sudo /home/ubi/kubernetes/bin/setup-cni")