A simple project to use as a tool to practice the lessons learned at the SUSE Cloud Native Foundations Scholarship.
If you want to test it, you'll need to have an account for the MaxMind GeoIP2 service (free account) see https://www.maxmind.com/en/geoip2-services-and-databases.
##Testing in Kubernetes Once you have vagrant up & running using the Vagrantfile in the home directory and you have k3s installed (installation instructions here ):
Note: There is a bug in Windows with Hypervisor & K3s so until is is solved, you should install version v1.20.7+k3s1 with curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.20.7+k3s1 sh
Move to the /vagrant/deployment
directory
kubectl apply -f namespace.yaml
kubectl apply -f airport-finder-secrets.yaml
Create a file named geoip2.account-id with the id, and another one named geoip2.license-key with the license key, of your MaxMind GeoIP2 service account.
No worries, git is configured to ignore those files so they won't be added to the source repository.
Run the following command to patch the secrets with the data:
kubectl create secret generic airport-finder-secrets --save-config --dry-run=client --from-file=./geoip2.account-id --from-file=./geoip2.license-key -o yaml | kubectl apply -f -
kubectl apply -f airport-finder-deployment.yaml
kubectl apply -f airport-finder-service.yaml
kubectl config set-context --current --namespace=scnfs-demo
alias findpod='POD=$(kubectl get pod -l app=airport-finder -o jsonpath="{.items[0].metadata.name}")'
kubectl get all
findpod;kubectl describe po $POD
findpod;kubectl logs --follow $POD
findpod;kubectl exec --stdin --tty $POD -- /bin/bash
kubectl delete -f airport-finder-deployment.yaml
kubectl delete -f airport-finder-service.yaml
mvn package jib:dockerBuild