Skip to content

Deploying a microservice app (based on weather api) as part of learning k8s

License

Notifications You must be signed in to change notification settings

MarouaneBouaricha/k8s-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-lab

Deploying a microservice app (based on weather api) as part of learning k8s

Environment

kind version 0.24.0
kubernetes v1.31.0
containerd v1.7.18

App Architecture

app-architecture

Deployment

Create namespace for the app

kubectl create namespace weather-app

Create secret for mysql auth database

A user named 'auth' will be created for interacting with weather-app database.

kubectl create secret generic mysql-secret \
  --from-literal=root-password='<root-pw>' \
  --from-literal=auth-password='<password-for-auth-user>' \
  --from-literal=secret-key='<secret-for-jwt>' \
  -n weather-app

Generate self-signed certificates for ingress

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=weatherapp.local/O=weatherapp"

Create a tls secret

kubectl create secret tls weatherapp-ui-tls --cert=tls.crt --key=tls.key

Apply Manifests

kubectl apply -f k8s/auth/mysql
kubectl apply -f k8s/auth

Modify secret.yaml to add your RAPIDAPI KEY

kubectl apply -f k8s/weather
kubectl apply -f k8s/ui

About

Deploying a microservice app (based on weather api) as part of learning k8s

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published