Debug School

rkumar0810@gmail.com
rkumar0810@gmail.com

Posted on

3rd day summary Rajesh Kumar

How to deploy a POD

API Resource POD
ReplicationController
ReplicaSets
Deployment

DaemonSets
StatefulSets

DaemonSets

Min -Max ---1 POD per Node

Make sure that only one POD on every worker


ConfigMap is data that is stored in cluster and that (key-value) can be attached to POD and mounted to container.

kubectl exec helloworld-nginx -n=raj -- ls /etc/nginx/conf.d
kubectl exec helloworld-nginx -n=raj -- more /etc/nginx/conf.d/myconfo.conf

Service

Network loadbalancer -- Network layer
Application loadbalancer -- Application layer

Service is network loadbalancer when selector label of POD matches

Matching PODS with service are loadbalanced by the service (conditions apply)

healthy pods
configured for session affinity -- one user session goes to one pod
can point to things outside the cluster
random load balancing
uses TCP by default

watch curl http:// to check loadbalancing

Type NodePort creates a service that is exposed to node port and at the same time giving a port to outside

kubectl expose deployment my-dep --port=80 --target-port=80 -n=raj --type=NodePort

Loadbalancer is outside the cluster - it is connected to DNS through which the user can access.

User-->DNS-->LoadBalancer-->NodePort-->Service-->PODs

NAME based Rule based certificate based - INGRESS rules

Ingress is application loadbalancer

Loadbalancer (outside the cluster) --> Ingress Controller (inside the controller) --> Read the rules in the Ingress --> Redirects traffic based on rules

Top comments (0)