Deployment to Kubernetes
Prerequisites
Install
kubectlhttps://kubernetes.io/docs/tasks/tools/Install
kustomizehttps://kubectl.docs.kubernetes.io/installation/kustomize/
Frontend
Staging
You may trigger staging release at any point of time from the master branch by:
cd podkrepi.bg/frontend
kubectl apply -k manifests/overlays/developmentThis will update the deployment using ghcr.io/podkrepi-bg/frontend:master image
Production
Create new release
The following command will:
Bump the version in
package.jsonTag the
latestmaster branch[
postversion] Push local tags to the remote originUpdate the image
newTagversion infrontend/manifests/overlays/production/kustomization.yamlCommit and push the manifest update
cd podkrepi.bg/frontend
kubectl apply -k manifests/overlays/productionApply manifests
Once the image has been built by the GitHub Actions and is present in the Docker image repository you may trigger the actual deployment to the cluster.
https://github.com/orgs/podkrepi-bg/packages/container/package/frontend
cd podkrepi.bg/frontend
kubectl apply -k manifests/overlays/productionBackend
Staging
You may trigger staging release at any point of time from the master branch by:
cd podkrepi.bg/backend
kubectl apply -k manifests/overlays/developmentThis will update the deployment using ghcr.io/podkrepi-bg/api:master image
Production
Create new release
The following command will:
Bump the version in
package.jsonTag the
latestmaster branch[
postversion] Push local tags to the remote originUpdate the image
newTagversion inbackend/manifests/overlays/production/kustomization.yamlCommit and push the manifest update
cd podkrepi.bg/backend
kubectl apply -k manifests/overlays/productionApply manifests
Once the image has been built by the GitHub Actions and is present in the Docker image repository you may trigger the actual deployment to the cluster.
https://github.com/orgs/podkrepi-bg/packages/container/package/api
cd podkrepi.bg/backend
kubectl apply -k manifests/overlays/productionManual deployment
If you want to set a specific version for the deployment image you can do that by editing backend/manifests/overlays/production/kustomization.yaml
images:
- name: ghcr.io/podkrepi-bg/api/migrations
newTag: v0.3.3
- name: ghcr.io/podkrepi-bg/api
newTag: v0.3.3Last updated
Was this helpful?