Completek8s Classroomnotes 05/Aug/2023

Restrictions for Kubernetes Pods in terms of Resources

  • Refer Here for Resource Management in K8s for Pods and containers
  • Lets create a pod spec which specifies
    • minimum 100 MiB RAM to Jenkins container
    • maximum 256 MiB RAM to Jenkins container
    • Refer Here for the spec
      Preview
      Preview
  • Lets create jenkins pod with same restrictions as above plus maximum cpu of 0.05

  • Pod specification is all about containers, but in reality we might need to control Pods not containers, We have other kuberenetes resources such as

    • Replica Sets
    • Deployments
    • Daemonsets
    • Statefulsets etc
    • Job
    • CronJob
  • Pods in k8s have

    • containers
    • ephemeralContainers
    • initContainers
  • Experiment: Refer Here to run a disaster.yaml file which contains 3 types of containers (note: this is not the way it is supposed to be)
  • Pod never starts:
---
apiVersion: v1
kind: Pod
metadata:
  name: actvity1
spec:
  containers:
    - name: jenkins
      image: jenkins/jenkins:lts-jdk11
  initContainers:
    - name: jenkinsi
      image: jenkins/jenkins:lts-jdk11

Preview
* Refer Here for the changes
* When init container completes then containers start
Preview
* Refer Here for the changes done
Preview
* Refer Here for init containers

Next Session

  • Accounts
    • GCP
    • AWS/AZURE

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