- Kubernetes
- Quarkus neo4j
- If need to create credentials for registry
kubectl create secret generic regcred --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson
- If need to retrieve credentials
kubectl run quarkus-quickstart --image=muallin/quarkus-neo4j --port=8080 --image-pull-policy=IfNotPresent --overrides='{ "apiVersion": "apps/v1", "spec": { "imagePullSecrets": [{"name": "regcred"}] } }'
- To expose endpoint
kubectl expose deployment quarkus-quickstart --type=NodePort
- Must build dockerfile.jvm
- Must create and endpoint and a service ( works for kubernetes 1.13)
kind: "Service"
apiVersion: "v1"
metadata:
name: "neo4j-service"
spec:
ports:
-
name: "bolt"
protocol: "TCP"
port: 7687
targetPort: 7687
---
kind: "Endpoints"
apiVersion: "v1"
metadata:
name: "neo4j-service"
subsets:
- addresses:
- ip: "192.168.1.36" #The IP Address of the external web server
ports:
- port: 7687
name: "bolt"
- Looks like the first time, default neo4j password is not properly set. You should connect to browser ( :7474 ) and change it
- Test with
- Retrieve
curl $(minikube service quarkus-quickstart --url)/fruits
- Create
curl -v -X POST $(minikube service quarkus-quickstart --url)/fruits -H 'Content-Type: application/json; charset=utf-8' -d $'{
"name": "Apple"}'
- Check quarkus-kubernetes