Skip to content

Instantly share code, notes, and snippets.

View venkatzgithub's full-sized avatar
🏠
Working from home

venkatzgithub

🏠
Working from home
View GitHub Profile
---
- name: Install package
hosts: all
become: true
tasks:
- name: update packages
yum:
name: '*'
state: latest
@venkatzgithub
venkatzgithub / gist:b6588f0b993f32cc5938b536f08f42ef
Last active November 21, 2020 15:30 — forked from Tej-Singh-Rana/gist:5c4c0221ef75d80c4ea980f94335c0cb
kubernetes cluster installation from kubeadm-way
##################### 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
@venkatzgithub
venkatzgithub / Revision
Last active March 7, 2023 19:12
CKA practice
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 \
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
* 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
@venkatzgithub
venkatzgithub / css-media-queries-cheat-sheet.css
Created July 8, 2020 06:28 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
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) { }
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
YAML - key value pair