{"id":27047201,"url":"https://github.com/rishant/kubernetes-learning","last_synced_at":"2026-02-26T01:12:47.326Z","repository":{"id":247999517,"uuid":"827131693","full_name":"rishant/Kubernetes-learning","owner":"rishant","description":"Kubernetes-learning","archived":false,"fork":false,"pushed_at":"2024-12-07T07:20:08.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-07T08:19:32.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rishant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-11T04:38:30.000Z","updated_at":"2024-12-07T07:20:11.000Z","dependencies_parsed_at":"2024-07-11T20:29:22.146Z","dependency_job_id":"213fdca3-f58c-4784-81f3-530eeff57239","html_url":"https://github.com/rishant/Kubernetes-learning","commit_stats":null,"previous_names":["rishant/kubernetes-learning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishant%2FKubernetes-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishant%2FKubernetes-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishant%2FKubernetes-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishant%2FKubernetes-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rishant","download_url":"https://codeload.github.com/rishant/Kubernetes-learning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299350,"owners_count":20916171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-05T06:28:39.983Z","updated_at":"2026-02-26T01:12:42.294Z","avatar_url":"https://github.com/rishant.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\"# Kubernetes-learning\" \n\n### References:\n\n```\n    https://kubernetes.io/docs/reference/kubectl/quick-reference/\t\n    https://spacelift.io/blog/kubernetes-cheat-sheet\n\n    https://www.youtube.com/watch?v=_f9ql2Y5Xcc\u0026list=PLl4APkPHzsUUOkOv3i62UidrLmSB8DcGC\u0026index=8\n    https://github.com/piyushsachdeva/CKA-2024/tree/main\n\n    https://www.youtube.com/watch?v=yVLXIydlU_0\u0026list=PLl4APkPHzsUUOkOv3i62UidrLmSB8DcGC\u0026index=11\n```\n\n## Kubernetes RoadMap\n\n```\nKubernetes\n├── Cluster\n│   ├── Node\n│   │   ├── Master Node\n│   │   │   ├── API Server\n│   │   │   ├── Controller Manager\n│   │   │   ├── Scheduler\n│   │   │   └── etcd\n│   │   ├── Worker Node\n│   │       ├── Kubelet\n│   │       ├── Kube-Proxy\n│   │       └── Container Runtime\n│   └── Namespace\t\t\t\t[Isolation - namespace is a way to divide cluster resources between multiple users or applications]\n├── Workloads\n│   ├── Pod\t\t\t\t\t\t[Deploy Image]\n│   ├── ReplicationController\t[Auto Scale (Container Replicas), Auto-Healing (Fault-tolarance spawn), Not-applied-with-existing-pods]\n│   ├── ReplicaSet\t\t\t\t[Auto Scale (Container Replicas), Auto-Healing (Fault-tolarance spawn), Applied-with-existing-pods]\n│   ├── Deployment  \t\t\t[Stateless Microservices application] (Rolling Updates | Rollbacks | Blue GreenCanary )\n│   ├── StatefulSet \t\t\t[Statelful Database application]\n│   ├── DaemonSet\t\t\t\t[Logging, Monitoring]\n│   ├── Job\n│   └── CronJob\n├── Services \u0026 Networking\n│   ├── Service\n│   │   ├── ClusterIP\t\t\t[Inter communication - Expose Cluster IP --\u003e to talk Inter Container communication --\u003e example: Front App Container talk to Backend Application Container]\n│   │   ├── NodePort\t    \t[External Communication - Expose Node Port --\u003e to access publicly deployed --\u003e Frontend Web Application --\u003e via Browser]\n│   │   ├── LoadBalancer\n│   │   └── ExternalName\n│   ├── Ingress\n│   ├── NetworkPolicy\n│   └── DNS\n├── Storage\n│   ├── Volume\n│   │   ├── emptyDir\n│   │   ├── hostPath\n│   │   ├── nfs\n│   │   ├── awsElasticBlockStore\n│   │   ├── gcePersistentDisk\n│   │   ├── azureDisk\n│   │   ├── azureFile\n│   │   ├── cephFS\n│   │   ├── iscsi\n│   │   ├── local\n│   │   └── csi\n│   ├── PersistentVolume\n│   ├── PersistentVolumeClaim\n│   └── StorageClass\n├── Configuration\n│   ├── ConfigMap\n│   ├── Secret\n│   ├── ResourceQuota\n│   ├── LimitRange\n│   ├── HorizontalPodAutoscaler\n│   └── PodDisruptionBudget\n├── Security\n│   ├── ServiceAccount\n│   ├── Role\n│   ├── RoleBinding\n│   ├── ClusterRole\n│   ├── ClusterRoleBinding\n│   └── PodSecurityPolicy\n└── Extensions \u0026 Add-ons\n    ├── Helm\n    ├── Operators\n    ├── CustomResourceDefinition (CRD)\n    ├── Prometheus\n    ├── Grafana\n    ├── Fluentd\n    ├── Istio\n    ├── Linkerd\n    └── Metrics Server\n```\n\n\n## `Configmap`\n\nSummary of ConfigMap Usage in Kubernetes:\n| Method\t| Use Case |\n| ------------ | ----------|\n| Environment Variables\t| Store app configurations and inject them into the container. |\n| Mounted as Files in a Volume |\tShare configuration files with the container. |\n| Command-Line Arguments |\tPass ConfigMap values as container arguments. |\n| Entire Volume\t| Mount all ConfigMap keys as individual files. |\n| Other Kubernetes Resources |\tUse in Deployments, StatefulSets, etc., for scaling purposes. |\n\n\n## 1. ConfigMap - Environment Variables:\n\n```\n---configmap_env_variables.yaml---\n  apiVersion: v1\n  kind: ConfigMap\n  metadata:\n    name: app-config\n  data:\n    APP_NAME: \"MyApp\"\n    APP_VERSION: \"1.0\"\n----------------------------------\n\ncmd:/\u003e kubectl apply -f configmap_env_variables.yaml\n\n--------deployment.yml----------\n  apiVersion: v1\n  kind: Pod\n  metadata:\n    name: app-pod\n  spec:\n    containers:\n      - name: app-container\n        image: nginx\n        env:\n          - name: APP_NAME\n            valueFrom:\n              configMapKeyRef:\n                name: app-config\n                key: APP_NAME\n          - name: APP_VERSION\n            valueFrom:\n              configMapKeyRef:\n                name: app-config\n                key: APP_VERSION\n----------------------------------------\n\n```\n\n## 2. Mounted as Files in a Volume\n\n```\n-----configmap_mount_as_file.yaml-----\n  apiVersion: v1\n  kind: ConfigMap\n  metadata:\n  name: app-config\n  data:\n    config.json: |\n      {\n      \"app_name\": \"MyApp\",\n      \"app_version\": \"1.0\"\n      }\n--------------------------------------\n\ncmd:/\u003e kubectl apply -f configmap_mount_as_file.yaml\n\n-------deploymnet.yaml-------\n  apiVersion: v1\n  kind: Pod\n  metadata:\n  name: app-pod\n  spec:\n  containers:\n    - name: app-container\n      image: nginx\n      volumeMounts:\n        - name: config-volume\n      mountPath: /etc/config\n  volumes:\n    - name: config-volume\n      configMap:\n        name: app-config\n---------------------------------------\n\nNote: \n1. This will mount the config.json file into the container at /etc/config/config.json.\n```\n\n## 3. Command-Line Arguments\n\n```\n-------ConfigMap_cmdline.yaml--------\n  apiVersion: v1\n  kind: ConfigMap\n  metadata:\n  name: app-config\n  data:\n    greeting: \"Hello, World!\"\n--------------------------------------\n\ncmd:/\u003e kubectl apply -f ConfigMap_cmdline.yaml    \n\n-------deploymnet.yaml-------\n  apiVersion: v1\n  kind: Pod\n  metadata:\n  name: app-pod\n  spec:\n  containers:\n    - name: app-container\n      image: busybox\n      command: [\"echo\"]\n      args:\n        - \"$(GREETING)\"\n      env:\n        - name: GREETING\n      valueFrom:\n        configMapKeyRef:\n        name: app-config\n        key: greeting\n-------------------------------\n```\n\n## 4. ConfigMap as an Entire Volume\n\n```\n-------ConfigMap_entire_volume.yaml--------\n  apiVersion: v1\n  kind: ConfigMap\n  metadata:\n  name: app-config\n  data:\n    app.properties: |\n      app.name=MyApp\n      app.version=1.0\n    db.properties: |\n      db.name=MyDB\n      db.version=2.0\n--------------------------------------\n\ncmd:/\u003e kubectl apply -f ConfigMap_entire_volume.yaml   \n\n-------deployment.yaml-----------------\n  apiVersion: v1\n  kind: Pod\n  metadata:\n    name: app-pod\n  spec:\n    containers:\n      - name: app-container\n        image: nginx\n        volumeMounts:\n          - name: config-volume\n            mountPath: /etc/config\n    volumes:\n      - name: config-volume\n        configMap:\n          name: app-config\n---------------------------------------\n\nNotes:\n    This will create two files inside the container:\n        /etc/config/app.properties\n        /etc/config/db.properties\n```\n\n## 5. Used by Another Kubernetes Resource\n\n```\n-------ConfigMap_another_k8s_resource.yaml--------\n  apiVersion: v1\n  kind: ConfigMap\n  metadata:\n    name: app-config\n  data:\n    APP_NAME: \"MyApp\"\n---------------------------------------------------\n\ncmd:/\u003e kubectl apply -f ConfigMap_another_k8s_resource.yaml  \n\n-------deployment.yaml-----------------\n  apiVersion: apps/v1\n  kind: Deployment\n  metadata:\n    name: app-deployment\n  spec:\n    replicas: 2\n    selector:\n      matchLabels:\n        app: my-app\n    template:\n      metadata:\n        labels:\n          app: my-app\n      spec:\n        containers:\n          - name: app-container\n            image: nginx\n            env:\n              - name: APP_NAME\n                valueFrom:\n                  configMapKeyRef:\n                    name: app-config\n                    key: APP_NAME\n-----------------------------------------\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishant%2Fkubernetes-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishant%2Fkubernetes-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishant%2Fkubernetes-learning/lists"}