This monorepo contains the kubernetes objects needed to deploy bk-rest-app
alias k=kubectl
alias kp="kubectl get pods"
alias kd="kubectl describe"
alias ks="kubectl get services"
This will allow us to get the resource consumption from cli
k apply -f metrics-server/metrics-server.yaml
-
Create PV and PVC
k apply -f postgres/postgres-pvc-pv.yaml
-
Create ConfigMap for Postgres service
- Update the
data
parameter atpostgres/postgres-config.yaml
then apply
`k apply -f postgres/postgres-config.yaml`
- Update the
-
Deploy Postgres
`k apply -f postgres/postgres-deployment.yaml`
- watch the process with
kp --watch
- watch the process with
-
Expose Postgres within Nodes
`k apply -f postgres/postgres-service.yaml`
- verify with
ks
- verify with
-
We need to get CloudFlare API KEY and Email
-
Update the
env
atdns/external-dns.yaml
then`k apply -f dns/external-dns.yaml`
- verify with
kp --watch
- verify with
-
Update the ConfigMap for postgres and application specific env vars at
bk-rest-app/bk-app-config.yaml
`k apply -f bk-rest-app/bk-app-config.yaml`
- verify with
k get cm
- verify with
-
Create docker registry secret
- Here I have used my private registry, so the
dockerconfigjson
was omitted. You can use any public registry or private ones.-
Generate and create the docker-registry secret with imperative command
k create secret docker-registry registry.sabbir.dev --docker-username=<username> --docker-password=<password> --docker-server=registry.sabbir.dev --dry-run=client -o yaml
-
Replace
<username>
and<password>
with the target registry credential.
-
- Here I have used my private registry, so the
-
Deploy App
`k apply -f bk-rest-app/bk-app-deployment.yaml`
verify with-
kp --watch
-
Expose application globally
- Edit the
externalIPs
andannotations
then run-
`k apply -f bk-rest-app/bk-svc.yaml`
- Edit the