This project is a student task focused on Kubernetes (K8s). Its goal is to provide hands-on experience in deploying and managing applications using Kubernetes.
In this project, we will explore the basic concepts of Kubernetes and learn how to deploy and manage applications using Kubernetes in a kind cluster. The project will cover topics such as:
- Setting up a Kubernetes cluster;
- Deploying the Grafana image;
- Deploying a web interface to populate Grafana dashboards;
- Deploying ingress;
- Mounting log files.
Before you begin, make sure you have the following prerequisites:
- Basic knowledge of containers and containerization;
- Familiarity with the Linux command-line interface;
- Access to a Linux operating system (VMs, WSL, Cloud Clusters);
- Kubernetes installed on the operating system;
To install the necessary tools and set up your development environment, follow these steps:
- Install Docker desktop: (https://docs.docker.com/desktop/install/windows-install/)
- Install Kubernetes: (https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)
- Install a tool that is capable of creating a local cluster:
- Update the system:
- sudo apt update
- sudo apt upgrade
- Install prerequisite packages:
- sudo apt-get install curl apt-transport-https ca-certificates software-properties-common
- Add the Docker repositories:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt update
- apt-cache policy docker-ce
- Install Docker for Ubuntu:
- sudo apt install docker-ce
- Check the Docker status:
- sudo systemctl status docker
- Install Kubernetes:
- Install a tool that is capable of creating a local cluster:
Refer to the Docker and Kubernetes documentation for proper installation instructions.
To use this project, follow these steps:
- Clone the repository:
https://github.com/Rafaelcoder18/dashboard-grafana-k8s.git
- Navigate to the project directory:
cd student-k8s-project
- Deploy the application using Kubernetes:
kubectl apply -f deployment.yaml
- Monitor the application using the Kubernetes dashboard:
kubectl proxy
and access the dashboard at http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
Contributions are welcome! If you have any ideas, suggestions, or bug reports, open an issue or submit a pull request.
This project is licensed under the MIT License.