/casual-integration-test

casual integration testing running on k8s

Primary LanguagePythonMIT LicenseMIT

casual-integration-test

casual integration testing running on k8s

minikube example

Requires that minikube is installed, along with kubectl

minikube start
minikube tunnel
minikube dashboard

Access internal image repository

eval $(minikube docker-env)

Now a:

docker image ls

should show you the k8s images

Build casual

./images/casual/build.sh

Build wildfly

./images/casual-java/wildfly/build.sh

Create POD

In images/casual-java/wildfly/k8s issue the following command:

kubectl apply -f domain-wildfly-and-casual.yaml

To replace a running POD:

kubectl replace --force -f ./domain-wildfly-and-casual.yaml 

Exposing ports

kubectl expose deployment deployment-name --type=LoadBalancer --port=port# --target-port=port# --name=your-name

Useful k8s commands

Logging

Follow the logging from a container in a POD:

kubectl logs -c container-name pod-name  --follow

Same but tracing:

kubectl logs -c container-name pod-name  --trace

Log into a container

kubectl exec --stdin --tty pod-name  -c container-name -- /bin/sh