Skip to content

Instantly share code, notes, and snippets.

@leenagupte
Last active May 31, 2024 09:49
Show Gist options
  • Save leenagupte/31531dcea660455c3a615f0c3626bfc6 to your computer and use it in GitHub Desktop.
Save leenagupte/31531dcea660455c3a615f0c3626bfc6 to your computer and use it in GitHub Desktop.
CKAD training setup
Link to CKAD training (will need to sign in):
https://trainingportal.linuxfoundation.org/learn/course/kubernetes-for-developers-lfd259/deployment-configuration/deployment-configuration
console.cloud.google.com
This is already done:
- VPC Network -> VPC Networks
- Firewall
Need to set up this again:
Compute Engine -> VM Instances
https://scribehow.com/shared/Create_Compute_Engine_instance_with_Ubuntu_and_SSH_key__hhUkshvOTJmXLpJ1mBg4ZA
CP:
ssh -i ~/.ssh/lfclass student@34.78.179.101
Worker:
ssh -i ~/.ssh/lfclass student@34.78.100.81
On both nodes:
wget https://cm.lf.training/LFD259/LFD259_V2024-02-22_SOLUTIONS.tar.xz --user=LFtraining --password=Penguin2014
tar -xvf LFD259_V2024-02-22_SOLUTIONS.tar.xz
On CP node:
find $HOME -name k8scp.sh
cp LFD259/SOLUTIONS/s_02/k8scp.sh .
bash k8scp.sh | tee $HOME/cp.out
On Worker node:
find $HOME -name k8sWorker.sh
cp LFD259/SOLUTIONS/s_02/k8sWorker.sh .
bash k8sWorker.sh | tee $HOME/cp.out
kudeadm step:
The kubeadm joinstatement can be found nearthe end of thekubeadm initoutput on the cp node. It should also be in the filecp.outas well. Your nodes will use adifferent IP address and hashes than the example below. You’ll need to pre-pend sudo to run the script copied from the cp node.
student@worker: ̃$ sudo kubeadm join --token 118c3e.83b49999dc5dc034 \10.128.0.3:6443 --discovery-token-ca-cert-hash \sha256:40aa946e3f53e38271bae24723866f56c86d77efb49aedeb8a70cc189bfe2e1d
Bash completion:
student@cp: ̃$ sudo apt-get install bash-completion vim -y
student@cp: ̃$ source <(kubectl completion bash)
student@cp: ̃$ echo "source <(kubectl completion bash)" >> $HOME/.bashrc
Add taints:
student@cp:~$ kubectl taint nodes --all node-role.kubernetes.io/control-plane-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment