{"id":25323879,"url":"https://github.com/miltlima/kubelearn","last_synced_at":"2026-02-28T01:14:50.750Z","repository":{"id":194419526,"uuid":"690679435","full_name":"miltlima/kubelearn","owner":"miltlima","description":":whale2: Learn deploy some objects in kubernetes","archived":false,"fork":false,"pushed_at":"2025-04-14T00:07:33.000Z","size":41321,"stargazers_count":45,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T01:20:23.966Z","etag":null,"topics":["golang","kubernetes","learning-exercise"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miltlima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2023-09-12T16:49:01.000Z","updated_at":"2025-04-14T00:07:37.000Z","dependencies_parsed_at":"2024-04-20T02:33:51.705Z","dependency_job_id":"6ad98f3f-8a98-4c28-acb2-15f3ce5f332b","html_url":"https://github.com/miltlima/kubelearn","commit_stats":null,"previous_names":["miltlima/kubelearn"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/miltlima/kubelearn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miltlima%2Fkubelearn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miltlima%2Fkubelearn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miltlima%2Fkubelearn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miltlima%2Fkubelearn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miltlima","download_url":"https://codeload.github.com/miltlima/kubelearn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miltlima%2Fkubelearn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263279277,"owners_count":23441682,"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":["golang","kubernetes","learning-exercise"],"created_at":"2025-02-14T00:54:49.457Z","updated_at":"2026-02-28T01:14:45.717Z","avatar_url":"https://github.com/miltlima.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/kubelearn_logo.png\" alt=\"Kubelearn Logo\" width=\"250\"/\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eKubelearn\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  Test your knowledge of Kubernetes — interactive quizzes, timed challenges, and score tracking.\n\u003c/p\u003e\n\n## Overview\n\nKubeLearn is a tool designed to help users test and expand their knowledge of Kubernetes. This project includes both a backend, which runs various Kubernetes-related tasks, and a frontend, which provides a user interface for interacting with the tool.\n\n## Project Structure\n\nThe project is organized into the following directories:\n\n```bash\n.\n├── cmd\n│   └── main.go                # Backend Go application\n├── kubelearn-frontend         # Frontend React application\n│   ├── postcss.config.js\n│   ├── src\n│   │   ├── App.js\n│   │   ├── App.test.js\n│   │   ├── index.js\n│   │   ├── reportWebVitals.js\n│   │   └── setupTests.js\n│   └── tailwind.config.js\n├── makefile                   # Makefile for managing the project\n└── pkg\n    ├── k8s                    # Kubernetes-related utilities\n    │   └── client.go\n    ├── resources              # Contains Kubernetes-related questions\n    │   ├── easy\n    │   ├── hard\n    │   └── medium\n    └── utils                  # Additional utilities\n```\n## Prerequisites\n\nTo run the project locally, you need to have the following installed:\n\n- Go (Golang)\n- Node.js and npm\n- Terraform\n- Kubernetes (kubectl)\n- Kind (for local Kubernetes clusters)\n\n## Makefile Commands\n\nThe `Makefile` provides several commands to manage the project efficiently. Below is a summary of the available targets:\n\n### Setup and Run KubeLearn\n\nThis command initializes Terraform, sets up the backend and frontend, and starts the services.\n\n```sh\nmake Kubelearn\n```\n\n### Stop KubeLearn\n\nThis command stops the backend and frontend services.\n\n```sh\nmake stopKubelearn\n```\n\n### Terraform Commands\n\n- **init**: Initializes the Terraform configuration.\n\n  ```sh\n  make init\n  ```\n\n- **apply**: Applies the Terraform configuration.\n\n  ```sh\n  make apply\n  ```\n\n- **destroy**: Destroys the Terraform-managed infrastructure.\n\n  ```sh\n  make destroy\n  ```\n\n### Kubernetes Manifest Management\n\n- **all**: Installs all Kubernetes manifests from the `manifests` directory.\n\n  ```sh\n  make all\n  ```\n\n- **clean**: Deletes all installed Kubernetes resources.\n\n  ```sh\n  make clean\n  ```\n\n- **check-syntax**: Validates the syntax of all Kubernetes manifests without applying them.\n\n  ```sh\n  make check-syntax\n  ```\n\n## Running the Project\n\n1. **Setup Environment**: Run `make Kubelearn` to initialize Terraform and start both the backend and frontend.\n\n2. **Access the Application**: After running the setup, the frontend will be available at `http://localhost:3000` by default, and the backend API at `http://localhost:8083`.\n\n3. **Stop the Services**: Run `make stopKubelearn` to stop the backend and frontend services.\n\n## Additional Information\n\n- Logs for the backend and frontend are stored in `backend.log` and `frontend.log`, respectively.\n- Ensure that your Kubernetes environment is properly configured before running the application.\n\n## Troubleshooting\n\n- If Terraform fails to initialize, ensure that your Terraform installation is correct and that the `config` directory contains valid configurations.\n- If the frontend doesn't start, verify that all npm dependencies are installed correctly.\n\n---\n\nThis documentation should cover the basic setup and usage of the KubeLearn project. For more detailed instructions or troubleshooting, please refer to the specific sections in this document.\n- If you encounter issues with Kubernetes resources, check the logs of the respective pods using `kubectl logs \u003cpod-name\u003e`. \n\nYou can use this documentation as a starting point and expand it further as needed. It covers the basic commands, project structure, and steps to run the project locally.\n\n\n## Answer the questions below\n\n| Questions | Description                                                                                                                                                            |\n|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1         | Create a new pod called `nginx` with `nginx:alpine` image in `default` namespace.                                                                                      |\n| 2         | Create a new deployment called `nginx-deployment` with `nginx:alpine` image and `4 replicas` in default namespace.                                                     |\n| 3         | Create a new deployment called `redis` with image `redis:alpine` in `latam` namespace, and create a service called `redis-service` with port `6379` in same namespace. |\n| 4         | Create a namespace called `europe`                                                                                                                                     |\n| 5         | Create a configmap `europe-configmap` with data `France=Paris`                                                                                                         |\n| 6         | Create a pod `thsoot` with label `country=china`, `amazon/amazon-ecs-network-sidecar:latest` image and namespace `asia`                                                |\n| 7         | Create a persistent volume `unicorn-pv` with capacity `1Gi` and access mode `ReadWriteMany` and host path `/tmp/data`                                                  |\n| 8         | Create a persistent volume claim `unicorn-pvc` with capacity `400Mi` and access mode `ReadWriteMany`                                                                   |\n| 9         | Create a pod `webserver` in `public` namespace with `nginx:alpine` image and a volume mount `/usr/share/nginx/html` and a persistent volume claim `unicorn-pvc`        |\n| 10        | There is a pod with problem, Can you able to solve it ?                                                                                                                |\n| 11        | Create a network policy `allow-policy-colors` to allow `redmobile-webserver` to access `bluemobile-dbcache` (There objects are created in colors namespace)            |\n| 12        | Create a secret `secret-colors` with data `color=red` in `colors` namespace                                                                                            |\n| 13        | Add a secret `secret-purple` with data `singer=prince` to the pod `purple` with image `redis:alpine` in `colors` namespace                                             |\n| 14        | Create a service account `america-sa` in `default` namespace                                                                                                           |\n| 15        | Add service account `america-sa` to the deployment `mark42`                                                                                                            |\n| 16        | Change the replica count of the deployment `mark42` to `5`                                                                                                             |\n| 17        | Create a horizontal pod autoscaler for deployment `mark43` with cpu percent `80`, min replicas `2` and max replicas `8`                                                |\n| 18        | Prevent privilege escalation in the deployment `mark42`                                                                                                                |\n| 19        | Add a `liveness` probe to the pod `mark50` with initial delay `5s`, period `10s` and path `/` in namespace `shield`                                                    |\n| 20        | Create a deployment `yellow-deployment` with `bonovoo/node-app:1.0` image and `2` replicas in namespace `colors`                                                       |\n| 21        | Create a service `yellow-service` for the deployment `yellow-deployment` in namespace `colors` with port `80` and target port `3000`                                   |\n| 22        | Create an ingress `ingress-colors` with host `yellow.com`, path `/yellow` and service `yellow-service` in namespace `colors`                                           |\n| 23        | Create a role `apple-one` with verbs `get, list, watch` in namespace `fruits`                                                                                          |\n| 24        | Create a job `job-gain` with parallelism `2`, completions `4`, backoffLimit `3` and deadlineSeconds `40`                                                               |\n| 25        | Create a cronjob `cronjob-gain` run a each `5` minutes with image `busybox:1.28`, command `'sleep 3600'` and restartPolicy `Never`                                     |\n| 26        | Create a statefulset `statefulset-gain` with image `busybox:1.28`, command `'sleep 3600'` and replicas `3`                                                             |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiltlima%2Fkubelearn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiltlima%2Fkubelearn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiltlima%2Fkubelearn/lists"}