This is a fork of https://github.com/paulbouwer/hello-kubernetes
This container image can be deployed on a ck8s cluster. It runs a web app, that displays the following:
- A default 'Hello world!' message, or a custom message can be configured via secrets.yaml.
- namespace, pod, and node details
- container image details
You can build the hello-ck8s
container image as follows:
export REGISTRY=harbor.$DOMAIN
export REPOSITORY=<demo> #change this to your own repository, remember to match it in github actions so it updates the manifest correctly
make build-image-linux
make push-image
To start, make sure you configure the Kubernetes cluster with an image pull secret. Ideally, you should create a container registry Robot Account, which only has pull permissions and use its token.
DOCKER_USER='robot$name' # enter robot account name
DOCKER_PASSWORD= # enter robot secret
Now create a pull secret, our service account is already configured to look for this secret.
# Create a pull secret
kubectl create secret docker-registry pull-secret \
--docker-server=harbor.$DOMAIN \
--docker-username=$DOCKER_USER \
--docker-password=$DOCKER_PASSWORD -n <destionation-namespace>
Adjust the values in the manifest as needed and run,
kubectl apply -f deploy/argocd/application.yaml
Pull-request generator continuously monitors your git repo for pull requests with a label specified in the applicationset. As a work-around to github's ratelimiting, create a secret
apiVersion: v1
data:
token: <base64 encoded github token with access to your repo>
kind: Secret
metadata:
name: github-token
namespace: argocd-system
type: Opaque
kubectl apply -f deploy/argocd/applicationset.yaml
DOCKERHUB_SECRET=<create-your-own-in-harbor>
DOCKERHUB_USERNAME=<create-your-own-in-harbor>