First, clear any existing sessions and then authenticate:
Copy
Ask AI
docker logoutdocker login# Enter your Docker ID and password or access token# Username: <your-dockerhub-username># Password: <your-password-or-access-token># Login Succeeded
For security, use a Docker Hub access token instead of your account password.
Fetch the pre-built Block Buster image from the original repository:
Copy
Ask AI
docker pull siddharth67/block-buster-dev:7.8.0# 7.8.0: Pulling from siddharth67/block-buster-dev# Digest: sha256:cf54e2a9efad47898d8ae12a3956b2ce7dbc69f239a22804ee78f691# Status: Image is up to date for docker.io/siddharth67/block-buster-dev:7.8.0
In your Flux cluster repository, create a GitRepository source and Kustomization:
Copy
Ask AI
cd ../block-buster/flux-clusters/dev-cluster# Define the Git source tracking the 8-demo branchflux create source git bb-app-source \ --url https://github.com/sidd-harth-2/bb-app-source \ --branch 8-demo \ --interval 1m \ --export > bb-app-source.yaml# Create a Kustomization to apply manifests from the sourceflux create kustomization bb-app-kustomize \ --source GitRepository/bb-app-source \ --path ./manifests \ --prune true \ --interval 1m \ --target-namespace dev \ --export > bb-app-kustomize.yaml# Apply the Flux resourceskubectl apply -f bb-app-source.yamlkubectl apply -f bb-app-kustomize.yaml
Trigger an immediate reconciliation and verify:
Copy
Ask AI
flux reconcile source git flux-systemflux reconcile kustomization flux-systemkubectl get ns# NAME STATUS AGE# dev Active 1mkubectl -n dev get all# Confirm the blockbuster Deployment, Service, Pod, etc.
Point your browser to the NodePort (e.g., localhost:30008) and confirm the high score persistence in version 7.8.0:
You’ve now integrated Docker Hub with Kubernetes and automated your deployment using Flux GitOps. Next up: creating a FluxRepository to track image updates and automate version bumps.