Skip to main content
In this guide, you’ll learn how to:
  1. Clone and migrate a Kubernetes manifest repository.
  2. Create and encrypt MongoDB credentials with Bitnami Sealed Secrets.
  3. Deploy a Solar System application using Argo CD in a secure GitOps workflow.

1. Clone the Manifest Repository

Start by cloning the repository that holds your Kubernetes manifests:
Open kubernetes/deployment.yaml to confirm its contents:
This deployment expects a secret named mongo-db-creds, which you’ll create in the next sections.

2. Migrate to Your Git Host

If you need to host your manifests elsewhere (for example, Gitea or another GitHub organization), use your Git provider’s import or migration tools:
The image shows a web interface for migrating a Git repository, with fields for the repository URL, access token, and options for migration settings.
After migration, ensure that both kubernetes/deployment.yaml and kubernetes/service.yaml are present in your new repository.

3. Create the MongoDB Secret

Verify your Kubernetes cluster context and namespaces:
Generate a Kubernetes Secret manifest for your MongoDB credentials without applying it:
Inspect the output:
Do not commit raw secrets to Git. Use an encryption mechanism like Bitnami Sealed Secrets to secure your credentials.

4. Seal the Secret with Bitnami Sealed Secrets

4.1 Retrieve the Controller’s Public Certificate

Check that the Sealed Secrets controller is running:
Find its TLS secret:
Extract the certificate:

4.2 Install and Verify kubeseal

Ensure you have the kubeseal CLI:

4.3 Create the SealedSecret

Encrypt your Secret manifest:
The resulting file looks like this:
Commit only the sealed secret and other manifest files to Git.

5. Configure Argo CD

Verify Argo CD is running in the argocd namespace:
The server’s NodePort is 31663, accessible via CLI or browser.
The image shows the Argo CD interface displaying an application named "bitnami-sealed-secrets" with its status as "Healthy" but "OutOfSync." The interface includes options to sync, refresh, or delete the application.

5.1 Create the Solar System Application

  1. In the Argo CD UI, click + New App.
  2. Enter the following:
    • Application Name: solar-system-argo-app
    • Project: default
    • Sync Policy: Manual
    • Destination Namespace: solar-system (enable auto-create)
    • Repository URL: <your-manifest-repo-url>
    • Revision: main
    • Path: kubernetes
  3. Click Create.
The image shows a Gitea repository interface for "solar-system-gitops-argocd," displaying recent commits and a README file outlining its use for Kubernetes manifest files in a project demo via Jenkins.
The image shows a user interface of Argo CD, displaying application settings with options for source repository configuration and sync status.
After creating the app, Argo CD will mark it OutOfSync:
The image shows the Argo CD interface displaying two applications, "bitnami-sealed-secrets" and "solar-system-argo-app," both marked as "OutOfSync" with different health statuses.
Inspect details to troubleshoot missing resources:
The image shows an Argo CD interface displaying the status of an application called "solar-system-argo-app," which is currently "OutOfSync" and "Missing." The interface includes a visual representation of the application's components and their statuses.
Whenever you update deployment.yaml (for example, bumping the Docker image tag) and push your commit, return to Argo CD and click Sync to deploy the changes.
The image shows a Git repository interface with a list of YAML files related to Kubernetes, including "deployment.yml," "secret.yml," and "service.yml." The files have recent commit messages and timestamps.

Conclusion

You’ve now:
  • Cloned and migrated a Kubernetes manifest repository.
  • Created and encrypted a MongoDB Secret using Bitnami Sealed Secrets.
  • Configured an Argo CD application to deploy the Solar System app.
This GitOps approach ensures all manifests and secrets remain in Git as the single source of truth, with strong encryption and declarative deployments.

Watch Video