DevOps Classroomnotes 13/Feb/2022

ReplicaSets contd..

  • Finding the ReplicaSet from Pod
    Preview
  • Scaling ReplicaSets:
  • Manual Scaling: One way is to change the replicas in yaml file and apply the file again
    Preview
    Preview
  • Auto Scaling: When we autoscale horizontal pod autoscaler (hpa) will be created
    Preview
    Preview
    Preview
  • AutoScaling can be done by create a manifest as well Refer Here

Namespaces

  • K8s namespaces provide a mechanism for isolating a group of resources with in a single cluster
  • Name of the resources should be unique with in a namespace, but not across namespaces.
  • Namespace-based scoping is applicable only for namespaced objects (Deployments, Services, Pods, Replicasets etc ) and not Cluster-wide Objects (Storage Classes, Nodes, Persistent Volumes etc)
    Preview
    Preview

Activity6: Create a Replicaset Which runs 2 replicas of jenkins

  • The image to be used is jenkins:1.651.2
  • replicas should be 2
  • create labels
  • app: jenkins
  • version: 1.651.2
  • port is 8080
  • Refer Here for the manifest created
  • Lets create the replica set
    Preview
  • The representation of the work done by us
    Preview
    Preview
  • Now we can easily create a loadbalancer using k8s object called as service. The only thing service can do is group resources /select resources based on labels and give one interface for access.
  • To access the pods scaled we can use service as shown below
    Preview
  • Now lets create a Service
  • Refer Here
  • Refer Here for the service manifest
  • Now if we apply the service, jenkins will be accessible on each node on port 32700 which will forward the request to service (k8s) and from there to the Pod
    Preview
  • Service info is injected as env variables in all the pods to be created after server
    Preview
  • Next Steps:
  • AKS and EKS
  • Service Discovery
  • Zero Downtime Deployments (rollouts and rollbacks)
  • Other => Workload Resources
  • Storage in K8s
  • RBAC

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
Social Media Icons Powered by Acurax Web Design Company

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