project: Setup GitHub Secrets

Tags kubernetes github
Hard Prerequisites
IMPORTANT: Please review these prerequisites, they include important information that will help you with this content.
  • K8S: Manual App Deployment – Project Overview
  • Soft Prerequisites
  • K8S: GitHub Actions
  • In the next chapters, we will be using GitHub to automate the process of building and pushing the Docker images and Helm Charts to Harbor using GitHub Actions. However, the communication with Harbor needs to be authenticated using its username and password.

    So far we been using the docker login command on the EC2 instance. Now we need store the Harbor credentials on GitHub using the GitHub Secrets, so it will know how to authenticate.

    On your GitHub repository page, go to Settings and then click on the Secrets and variables on the left panel and the on Actions.

    Click on the button New repository secret and create the following secrets, one at a time:

    • Name: DOCKER_USERNAME, secret: admin
    • Name: DOCKER_PASSWORD, secret: harbor12345
    • Name: HARBOR_ENDPOINT, secret: harbor.<your-domain>

    We will be referencing these secrets in the GitHub Actions workflow files.


    RAW CONTENT URL