Kubernetes Notes
Kubernetes Notes
Kubernetes architecture
Kube scheduler Schedulign application/contaners on nodes, Kube scheduler identifies the right node
Kublet Kublet is the captian of the worker nodes
Kube-Proxy Communication between the worker nodes (Web-Database Alike)
Master
Worker nodes
Notes
Adverstised Client URL
apiVersion: v1 pod definition .yml kind filed Version field
kind: pod pod v1
metadata: service v1
name: My-pod ReplicaSet apps/v1
Labels Deploymenapps/v1
app: myapp
type: front-end
spec:
containers:
first item - name: nginx-container
image; nginx
Commands
kubctl get pods
Version field
Commands
PODS
REPLICATIONSET
DEPLOYMENTS
NAMESPACES
IMPERATIVE COMMANDS
kubectl apply -f
kubectl run nginx-pod --image=nginx:alpine
kubectl run redis --image=redis:alpine --dry-run=client -oyaml > redis-pod.yaml
metadata changes ( Label Set)
kubectl expose
kubectl expose pod redis --port=6379 --name redis-service
kubectl create deployment webapp --image=kodekloud/webapp-color --replicas=3
kubectl run custom-nginx --image=nginx --port=8080
kubectl create namespace dev-ns
kubectl create ns dev-ns
kubectl create deployment redis-deploy --image=redis --replicas=2 -n dev-ns
kubectl create deployment redis-deploy --image redis --namespace=dev-ns --dry-run=client -o yaml > deploy.yaml
kubectl scale deployment
kubectl edit deployment
kubectl apply -f deploy.yaml
kubectl run httpd --image=httpd:alpine --port=80 --expose
Name
ReplicaSets
Desired
Deployment (d caps)
deploy
how many
just count
how many pod in research namespace
just count
Create a POD in the finance namespace.
find with pod name
type- ClusterIP
targetPort
component=apiserver
if there is no scheduler pod present in the kube-system namespace pod won't get genereated
creating taint
Remove Taint
Ready Status Age
apiVersion: v1
kind: Pod
metadata:
name: bee
spec:
containers:
- image: nginx
name: bee
tolerations:
- key: spray
value: mortein
effect: NoSchedule
operator: Equal
https://kodekloud.com/topic/practice-test-labels-and-selectors-2/
Gmail login