DevOps Classroom notes 28/Jan/2024

k8s contd

Kube-proxy

  • kube-proxy is responsible for cluster level networking, while CNI is responsible for low level networking on Pod, kube-proxy which is present on each node helps in Service level abstractions such as node-port, node to pod, pod to pod, pod to service connections.
  • kube-proxy manages ipTables and makes routing possible.

k8s Deployments

Trail 1:

  • Demonstrate deployment with some example
  • Refer Here for the manifest
  • Apply the manifest
    Preview
    Preview
  • Lets review some additional commands
    Preview
  • Now lets make some changes in the manifest Refer Here for changes
    Preview
  • Now lets assume you didnt like the release and want to go back to previous version (revision=1)
    Preview

Trail 2

  • Write a deployment spec for jenkins with rolling updates
    • surge: 40 %
    • unavailable: 40%
    • replicas = 10
  • Refer Here for manifests

Probes in Pods

  • Refer Here for offical docs
  • K8s gives the following probes
    • liveness probe: This determines whether the application in container is started correctly. If this check fails, k8s will try to restart the container according to restartPolicy.
    • readiness probe: This determines whether the container is ready to serve requests. if this check fails, the service will not forward the requests to the pod
    • startup probe: This is added for slow starting applications, till startup probe is completed, liveness probes will not be executed.
  • Types of checks Refer Here
    • exec
    • grpc
    • httpGet
    • tcpSocket
  • Lets write a Pod spec with basic checks
  • Refer Here for the manifest with positive and negative readiness probes
    Preview
    Preview

Exercises

  • Try to write a pod manifest for any application with web interface
    • spring petclinic
    • nop
    • apache
    • httpd
    • tomcat
  • Ensure your manifests always have
    • resources
    • probes
    • ports
  • Now try making a replicaset, deployment and expose using service.

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube