-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
83 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% set api_fqdn = "api.%s.sslip.io" % api_ip.replace('.', '-').replace(':', '-') if sslip|default(False) else "api.%s.%s" % (cluster, domain) %} | ||
apiVersion: kubeadm.k8s.io/v1beta4 | ||
kind: InitConfiguration | ||
bootstrapTokens: | ||
- token: "{{ token }}" | ||
ttl: "0" | ||
localAPIEndpoint: | ||
advertiseAddress: 0.0.0.0 | ||
bindPort: 6443 | ||
certificateKey: "{{ cert_key }}" | ||
--- | ||
apiVersion: kubeadm.k8s.io/v1beta4 | ||
kind: ClusterConfiguration | ||
clusterName: "{{ cluster }}" | ||
{% if minor_version is defined %} | ||
kubernetesVersion: {{ minor_version }} | ||
{% endif %} | ||
controlPlaneEndpoint: {{ api_fqdn }}:6443 | ||
networking: | ||
podSubnet: {{ cluster_network_ipv4 }} | ||
serviceSubnet: {{ service_network_ipv4 }} | ||
dnsDomain: "{{ cluster }}.{{ domain }}" | ||
apiServer: | ||
certSANs: | ||
- {{ api_fqdn }} | ||
{% if disconnected_url != None %} | ||
imageRepository: {{ disconnected_url }} | ||
{% endif %} | ||
{% if not coredns %} | ||
dns: | ||
disabled: true | ||
{% endif %} | ||
{% if not kube_proxy %} | ||
proxy: | ||
disabled: true | ||
{% endif %} | ||
--- | ||
{% if feature_gates %} | ||
apiVersion: kubelet.config.k8s.io/v1beta1 | ||
cgroupDriver: systemd | ||
featureGates: | ||
{% for feature_gate in feature_gates %} | ||
{{ feature_gate }}: true | ||
{% endfor %} | ||
kind: KubeletConfiguration | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% set api_ip = api_ip or ('{0}-ctlplane-1'.format(cluster)|kcli_info('ip') if scale|default(False) and 'ctlplane-0' in name else first_ip) %} | ||
|
||
apiVersion: kubeadm.k8s.io/v1beta4 | ||
kind: JoinConfiguration | ||
discovery: | ||
tlsBootstrapToken: {{ token }} | ||
bootstrapToken: | ||
apiServerEndpoint: {{ api_ip }}:6443 | ||
token: {{ token }} | ||
unsafeSkipCAVerification: true | ||
{% if 'ctlplane' in name %} | ||
controlPlane: | ||
localAPIEndpoint: | ||
advertiseAddress: 0.0.0.0 | ||
bindPort: 6443 | ||
certificateKey: {{ cert_key }} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
{% if api_ip == None %} | ||
{% set api_ip = '{0}-ctlplane-1'.format(cluster)|kcli_info('ip') if scale|default(False) and 'ctlplane-0' in name else first_ip %} | ||
{% endif %} | ||
|
||
TOKEN={{ token }} | ||
CTLPLANES="{{ '--control-plane --certificate-key %s' % cert_key if 'ctlplane' in name else '' }}" | ||
{% set api_ip = api_ip or ('{0}-ctlplane-1'.format(cluster)|kcli_info('ip') if scale|default(False) and 'ctlplane-0' in name else first_ip) %} | ||
|
||
echo {{ api_ip }} api.{{ cluster }}.{{ domain }} >> /etc/hosts | ||
kubeadm join {{ api_ip }}:6443 --token $TOKEN --discovery-token-unsafe-skip-ca-verification $CTLPLANES | ||
kubeadm join --config /root/config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters