Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Infrastructure GitOps
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shivering-Isles
Infrastructure GitOps
Commits
9cf85285
Verified
Commit
9cf85285
authored
3 years ago
by
Sheogorath
Browse files
Options
Downloads
Patches
Plain Diff
fix(kubeadm-init): Adjust the host names for the make-ssh magic
parent
9bd4fffa
No related branches found
No related tags found
1 merge request
!2
Draft: Makefile: Add all commands to deploy the kubernetes controlplane
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/kubernetes-init.mk
+9
-9
9 additions, 9 deletions
utils/kubernetes-init.mk
with
9 additions
and
9 deletions
utils/kubernetes-init.mk
+
9
−
9
View file @
9cf85285
.PHONY
:
kubeadm-init
kubeadm-init
:
ssh
node
01.
$(
TF_VAR_dns_domain
)
kubeadm init
--control-plane-endpoint
"api.
$(
TF_VAR_dns_domain
)
:6443"
--upload-certs
--pod-network-cidr
"192.168.0.0/16"
ssh
node
01.
$(
TF_VAR_dns_domain
)
systemctl
enable
kubelet.service
ssh
cp
01.
$(
TF_VAR_dns_domain
)
kubeadm init
--control-plane-endpoint
"api.
$(
TF_VAR_dns_domain
)
:6443"
--upload-certs
--pod-network-cidr
"192.168.0.0/16"
ssh
cp
01.
$(
TF_VAR_dns_domain
)
systemctl
enable
kubelet.service
kubeadm-copy-config
:
##
Copy Kubernetes admin config from
node
01 to the local machine
scp
node
01.
$(
TF_VAR_dns_domain
)
:/etc/kubernetes/admin.conf /root/.kube/config
kubeadm-copy-config
:
##
Copy Kubernetes admin config from
cp
01 to the local machine
scp
cp
01.
$(
TF_VAR_dns_domain
)
:/etc/kubernetes/admin.conf /root/.kube/config
kubeadm-join-masters
:
ssh
node
02.
$(
TF_VAR_dns_domain
)
$$(
ssh
node
01.
$(
TF_VAR_dns_domain
)
kubeadm token create
--ttl
1h
--print-join-command
--certificate-key
"
$$(
ssh
node
01.
$(
TF_VAR_dns_domain
)
kubeadm init phase upload-certs --upload-certs | tail -1
)
"
|
tail
-1
)
ssh
node
02.
$(
TF_VAR_dns_domain
)
systemctl
enable
kubelet.service
ssh
node
03.
$(
TF_VAR_dns_domain
)
$$(
ssh
node
01.
$(
TF_VAR_dns_domain
)
kubeadm token create
--ttl
1h
--print-join-command
--certificate-key
"
$$(
ssh
node
01.
$(
TF_VAR_dns_domain
)
kubeadm init phase upload-certs --upload-certs | tail -1
)
"
|
tail
-1
)
ssh
node
03.
$(
TF_VAR_dns_domain
)
systemctl
enable
kubelet.service
ssh
cp
02.
$(
TF_VAR_dns_domain
)
$$(
ssh
cp
01.
$(
TF_VAR_dns_domain
)
kubeadm token create
--ttl
1h
--print-join-command
--certificate-key
"
$$(
ssh
cp
01.
$(
TF_VAR_dns_domain
)
kubeadm init phase upload-certs --upload-certs | tail -1
)
"
|
tail
-1
)
ssh
cp
02.
$(
TF_VAR_dns_domain
)
systemctl
enable
kubelet.service
ssh
cp
03.
$(
TF_VAR_dns_domain
)
$$(
ssh
cp
01.
$(
TF_VAR_dns_domain
)
kubeadm token create
--ttl
1h
--print-join-command
--certificate-key
"
$$(
ssh
cp
01.
$(
TF_VAR_dns_domain
)
kubeadm init phase upload-certs --upload-certs | tail -1
)
"
|
tail
-1
)
ssh
cp
03.
$(
TF_VAR_dns_domain
)
systemctl
enable
kubelet.service
kubectl-remove-first-master-taints
:
kubectl taint nodes
node
01.
$(
TF_VAR_dns_domain
)
node-role.kubernetes.io/master-
kubectl taint nodes
cp
01.
$(
TF_VAR_dns_domain
)
node-role.kubernetes.io/master-
kubectl-remove-all-master-taints
:
kubectl taint nodes
--all
node-role.kubernetes.io/master-
||
true
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment