sample-app
as frontend which serves a React app and sample-service
as backend which stores data in a PostgreSQL database.kubectl get services -n ingress-nginx
in the Cloud Shell and note it down.kubectl get nodes
to see the new nodes you just created.kubectl edit configmap aws-auth -n kube-system
. The following configuration needs to be added for the user (you can copy the userarn
from the AWS Cloud Console; make sure to also exchange <username>
with the name of the user you just created):kubectl get services -n ingress-nginx
in the Cloud Shell and note it down.sample-service
required a PostgreSQL database to store data. We will now create this database. In general, there are 2 options: (a) you can create the database in the same infrastructure you are using for your Kubernetes cluster or (b) you can use a database-as-a-service provider like Aiven to create your database independently from the offerings of the large hyperscalers. We will explain both approaches in this section.yes
in Public access. Define a Master password for the Master username postgres. Make sure to note down the password. You can leave all other settings in the default setting.postgres
if you have not changed the default during the creation process) you defined earlier.Endpoint
in the AWS Console) and the Port (typically 5432
).sample-app
and the sample-service
. We will use Github and Github Actions in this tutorial but you should be able to use the Git and CI solution of your choice and follow the same general steps.sample-app:
PROJECT_ID
: the ID of the newly created GCP project.GCR_DEVOPS_SERVICE_ACCOUNT_KEY
: the content of the service account key JSON file you created earlier.HUMANITEC_TOKEN
: the Humanitec API token you cerated earlier.sample-service
. Make sure to change the IMAGE_NAME
to my-sample-service in the Github Action.sample-app:
REPO_NAME
: the name of the Amazon ECR repo, i.e.,sample-app
.AWS_ACCESS_KEY_ID
: the access key ID of the IAM user you created earlier.AWS_SECRET_ACCESS_KEY
: the secret access key of the IAM user you created earlier.HUMANITEC_TOKEN
: the Humanitec API token you created earlier.sample-service
. Make sure to change the IMAGE_NAME
to my-sample-service in the Github Action.my-sample-app
and my-sample-service
as images. After the first deployment, check what happened in your Kubernetes cluster and in your database instance. There should be a new namespace with workloads in the Kubernetes cluster and a new database user and a new database within the database instance.