This file contains hidden or 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
--- | |
- name: Install package | |
hosts: all | |
become: true | |
tasks: | |
- name: update packages | |
yum: | |
name: '*' | |
state: latest |
This file contains hidden or 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
##################### Master Node ################################################## | |
# Set the hostname | |
$ hostnamectl set-hostname <enter-hostname> | |
# To get effect in the system without reboot, run the following command: | |
$ exec bash | |
# Do entry in the /etc/hosts for master and worker nodes to identify by it's hostname. | |
e.g. echo "172.16.238.10 master" >> /etc/hosts | |
echo "172.16.238.11 worker01" >> /etc/hosts |
This file contains hidden or 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
alias k=kubectl | |
k version --short | |
export do="--dry-run=client -o yaml" | |
# then we can run | |
Create Pod YAML | |
k run redis --image=redis:alpine -l tier=db | |
k run pod1 --image=nginx $do | |
k run pod1 \ |
This file contains hidden or 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
Practise json path 3-4 question will be on that. | |
https://medium.com/faun/be-fast-with-kubectl-1-18-ckad-cka-31be00acc443 | |
https://www.youtube.com/watch?v=wgfjXHw7uPs&feature=youtu.be | |
https://docs.linuxfoundation.org/tc-docs/certification/lf-candidate-handbook/exam-user-interface | |
https://training.linuxfoundation.org/cka-program-changes-2020/ | |
https://medium.com/@shekharsarker/changes-with-certified-kubernetes-administrator-cka-certification-2020-9d17a0e15d59 | |
IMP: | |
Deployment - create, verify, scale, expose, rollout, undorollout, history | |
Pod - create, modify, expose, staticPod, Multicontainer pod, troubleshooting |
This file contains hidden or 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
* install container runtime | |
* Installing kubeadm, kubelet and kubectl | |
sudo apt-get update && sudo apt-get install -y apt-transport-https curl | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
deb https://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
sudo apt-get update |
This file contains hidden or 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
/*------------------------------------------ | |
Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
1280-1024 - desktop (default grid) | |
1024-768 - tablet landscape | |
768-480 - tablet | |
480-less - phone landscape & smaller | |
--------------------------------------------*/ | |
@media all and (min-width: 1024px) and (max-width: 1280px) { } | |
@media all and (min-width: 768px) and (max-width: 1024px) { } |
This file contains hidden or 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
CKAD | |
Core Concepts (13%) | |
kubectl create namespace mynamespace | |
kubectl run nginx --image=nginx --restart=Never -n mynamespace | |
kubectl run nginx --image=nginx --restart=Never --dry-run -o yaml > myfile.yaml | |
kubectl run busybox --image=busybox --command --restart=Never -it -- env #withoutput | |
kubectl run busybox --image=busybox --command --restart=Never -- env #with | |
kubectl logs busybox | |
kubectl run busybox --image=busybox --restart=Never -o yaml --dry-run --command env > myfile.yaml | |
kubectl apply -f myfile.yaml |
This file contains hidden or 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
YAML - key value pair |