This is the GitOps repo, which relates to DevOps-service repo.
Deployments files are in another repo: https://github.com/boyanaboneva/devops-gitops
Create another namespace, e.g. 'application':
kubectl create namespace applicationTo create a config map with environment variables navigate to the file in the gitops repo via terminal:
kubectl apply -f env_fastapi_configmap.ymlUsing terminal navigate to the kubernetes deployment folder in the gitops repo. Apply the 'deployment.yml' file in the newly created namespace, e.g. 'application':
kubectl apply -f deployment.yml -n applicationThe response should look like this:
deployment.apps/fast-api-deployment createdTo check everything is applied, get the pods of this namespace:
kubectl get pods -n applicationThe response should look like this:
NAME READY STATUS RESTARTS AGE
fast-api-deployment-66ff55bb64-cmkbl 1/1 Running 0 22sUsing terminal navigate to the kubernetes deployment folder in the gitops repo. Apply the 'service.yml' file in the newly created namespace, e.g. 'application':
kubectl apply -f service.yml -n applicationThe response should look like this:
service/fastapi-service configured