Рет қаралды 72,299
LEC 54 NOTES TECHNICAL GUFTGU
====================
Install Docker
$ sudo apt update && apt -y install docker.io
Install kubectl
$ curl -LO storage.google... -s storage.google... && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl
Install Minikube
$ curl -Lo minikube storage.google... && chmod +x minikube && sudo mv minikube /usr/local/bin/
Start Minikube
$ apt install conntrack
$ minikube start --vm-driver=none
$ minikube status
==============================NAMESPACES===================================
apiVersion: v1
kind: Namespace
metadata:
name: dev
labels:
name: dev
=================================to create a pod=================
vi pod.yml
kind: Pod
apiVersion: v1
metadata:
name: testpod
spec:
containers:
- name: c00
image: ubuntu
command: ["/bin/bash", "-c", "while true; do echo Technical Guftgu; sleep 5 ; done"]
restartPolicy: Never
==============================================================================================
$ kubectl config set-context $(kubectl config current-context) --namespace=dev
$ kubectl config view | grep namespace:
==============================================================================================
apiVersion: v1
kind: Pod
metadata:
name: resources
spec:
containers:
- name: resource
image: centos
command: ["/bin/bash", "-c", "while true; do echo Technical-Guftgu; sleep 5 ; done"]
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "128Mi"
cpu: "200m"
============RESOURCEQUOTA========================================
apiVersion: v1
kind: ResourceQuota
metadata:
name: myquota
spec:
hard:
limits.cpu: "400m"
limits.memory: "400Mi"
requests.cpu: "200m"
requests.memory: "200Mi"
===========================================================
kind: Deployment
apiVersion: apps/v1
metadata:
name: deployments
spec:
replicas: 3
selector:
matchLabels:
objtype: deployment
template:
metadata:
name: testpod8
labels:
objtype: deployment
spec:
containers:
- name: c00
image: ubuntu
command: ["/bin/bash", "-c", "while true; do echo Technical-Guftgu; sleep 5 ; done"]
resources:
requests:
cpu: "200m"
============================================================
apiVersion: v1
kind: LimitRange
metadata:
name: cpu-limit-range
spec:
limits:
- default:
cpu: 1
defaultRequest:
cpu: 0.5
type: Container
==============cpu2.yml======================================
apiVersion: v1
kind: Pod
metadata:
name: default-cpu-demo-2
spec:
containers:
- name: default-cpu-demo-2-ctr
image: nginx
resources:
limits:
cpu: "1"
=================================================================================================
apiVersion: v1
kind: Pod
metadata:
name: default-cpu-demo-3
spec:
containers:
- name: default-cpu-demo-3-ctr
image: nginx
resources:
requests:
cpu: "0.75"
===============================================
Now you can Donate us via Paypal or Google Pay
Paypal link : www.paypal.me/...
GooglePay/PhonePe/BHIM App UPI ID : bhupinderccs@okaxis
Visit Our Website for all the Courses- www.technicalguftgu.in
Do subscribe to TECHNICAL GUFTGU channel and Press Bell icon & get regular updates on videos, DIRECT LINK TO CHANNEL : / technicalguftgu
Here are direct links of My All the Playlist: MUST CHECK
IPv6 Complete Tutorial for beginners Link : • IP Version 6 Tutorials...
Microsoft Azure Tutorial for beginners in Hindi/Urdu AZ-103 and AZ-900 LINK : • Microsoft Azure Tutori...
AWS Solution Architect-Associate complete Tutorials Link : • AWS Solution Architect...
Devops tutorials in Hindi:-
• What are the Pre-requi...
CCNA Complete Tutorials /Computer Networking Link : • CCNA Full course in Hi...
Bhupinder Rajput Sir is having 8 Years of Experience in the field of technical trainings in entire india.
NOTE : If you would like to organise Bhupinder Rajput Sir workshop in your College or University, write mail to us.
Thanks For giving Your Valuable time.
Regards,
Technical Guftgu Team