Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ztrzaska/k8s
Kubernetes with web application and mongo database
https://github.com/ztrzaska/k8s
k8s k8s-config k8s-deployment k8s-ingress k8s-secret k8s-service kubernetes mongodb mongodb-express
Last synced: about 1 month ago
JSON representation
Kubernetes with web application and mongo database
- Host: GitHub
- URL: https://github.com/ztrzaska/k8s
- Owner: ztrzaska
- Created: 2022-08-19T08:06:40.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-15T14:24:31.000Z (over 2 years ago)
- Last Synced: 2023-07-26T12:33:38.135Z (over 1 year ago)
- Topics: k8s, k8s-config, k8s-deployment, k8s-ingress, k8s-secret, k8s-service, kubernetes, mongodb, mongodb-express
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kubernetes with web application and mongo database
### Get started
The following application illustrate simple kubernetes cluster. It contains few modules, which is spring boot web application, mongo database server, mongo express client, k8s secret with database configuration, config map and ingress component.
The configuration and statistics can be done with using kubernetes dashboard. Project describe how to access dashboard UI.
### Installation
```
minikube start
```Applying all k8s config files:
```
kubectl apply -f db-secret.yaml
kubectl apply -f db-config.yaml
kubectl apply -f mongo.yaml
kubectl apply -f mongo-express.yaml
kubectl apply -f webapp.yaml
kubectl apply -f ingress.yaml
```### Accessing web application
```
minikube iphttp://:30100/
```### Accessing mongo express client
```
minikube ip
http://:30200/
```### Checking pod logs
```
kubectl get pod
kubectl logs
kubectl describe pod
```
### Kubernetes dashboard#### Create account for kubernetes dashboard
```
cd dashboard
kubectl apply -f admin-user.yaml
kubectl apply -f cluster-role.yaml
```#### Create Bearer Token
```
kubectl -n kubernetes-dashboard create token admin-user
```#### Accessing kubernetes dashboard
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/
## Documentation of the libraries used
* [Kubernetes documentation](https://kubernetes.io/)
* [Kubernetes dashboard](https://github.com/kubernetes/dashboard/blob/master/docs/user/access-control/creating-sample-user.md)
* [Kubernetes example config files](https://kubernetes.io/docs/concepts/workloads/controllers/)
* [Spring boot](https://docs.spring.io/spring-boot/docs/current/reference/html/)