quarkus-operator-sdk 備忘録

https://developers.redhat.com/articles/2023/08/16/how-implement-kubernetes-operators-java-operator-sdk

-> https://github.com/tkobayas/operator-examples/tree/main/echo-operator

minikube delete
minikube start

minikube addons enable ingress

mvn clean compile
mvn quarkus:dev

kubectl apply -f src/test/resources/cr-test-echo-resource.yaml

kubectl get crd
kubectl describe crd echoresources.example.example.com
kubectl get echoresources

devじゃない場合

minikube delete
minikube start

minikube addons enable ingress

kubectl apply -f ./samples/exposedapp/target/bundle/quarkus-operator-sdk-samples-exposedapp/manifests/exposedapps.halkyon.io-v1.crd.yml

mvn clean package
java -jar target/quarkus-app/quarkus-run.jar

kubectl apply -f ./samples/exposedapp/src/main/resources/app.yml

<quarkus>
2024-04-02 16:04:07,937 INFO  [io.hal.ExposedAppReconciler] (ReconcilerExecutor-exposedapp-52) App hello-quarkus is not ready yet, rescheduling reconciliation after 1s
 のログを繰り返す。最終的に
2024-04-02 16:04:57,948 INFO  [io.hal.ExposedAppReconciler] (ReconcilerExecutor-exposedapp-60) App hello-quarkus is exposed and ready to be used at https://192.168.49.2


kubectl get crd
kubectl describe crd echoresources.example.example.com
kubectl get echoresources