Closed jxtpro closed 7 months ago
/cc @geoand (kubernetes), @iocanel (kubernetes)
I am not sure what the reported problem is here and how it's suppose to relate to Quarkus.
Please improve the description of the issue if you want us to have a deeper look.
Thanks
使用mvn创建项目
mvn io.quarkus.platform:quarkus-maven-plugin:3.9.1:create \
-DprojectGroupId=org.acme \
-DprojectArtifactId=kubernetes-quickstart \
-Dextensions='rest,kubernetes,jib'
cd kubernetes-quickstart
添加如下配置:
# server.port
#quarkus.http.port=8888
# harbor
quarkus.container-image.username=admin
quarkus.container-image.password=Harbor12345
# docker image -> 10.7.0.147:8088/quarkus/demo-app:1.0
quarkus.container-image.registry=10.7.0.147:8088
quarkus.container-image.builder=docker
# docker
quarkus.container-image.group=library
quarkus.container-image.name=demo-app
quarkus.container-image.tag=1.0
# k8s
quarkus.kubernetes.replicas=1
quarkus.kubernetes.ingress.expose=true
quarkus.kubernetes.ingress.host=prod.svc.url
quarkus.kubernetes.ports.http.path=/prod
# k8s route rules
quarkus.kubernetes.ingress.rules.1.host=dev.svc.url
quarkus.kubernetes.ingress.rules.1.path=/dev
quarkus.kubernetes.ingress.rules.1.path-type=ImplementationSpecific
quarkus.kubernetes.ingress.rules.2.host=alt.svc.url
quarkus.kubernetes.ingress.rules.2.path=/ea
quarkus.kubernetes.ingress.rules.2.service-name=updated-service
quarkus.kubernetes.ingress.rules.2.service-port-name=tcpurl
运行
./mvnw install -DskipTests
生成了 kubernetes.yml
文件
运行
kubectl apply -f target/kubernetes/kubernetes.yml
如下:
❯ kubectl get pod,deploy,svc,ing,pv,pvc
NAME READY STATUS RESTARTS AGE
pod/kubernetes-quickstart-5df99d7885-6r965 1/1 Running 0 24h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/kubernetes-quickstart 1/1 1 1 25h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 44h
service/kubernetes-quickstart ClusterIP 10.106.149.0 <none> 80/TCP 25h
NAME CLASS HOSTS ADDRESS PORTS AGE
ingress.networking.k8s.io/kubernetes-quickstart <none> prod.svc.url,dev.svc.url,alt.svc.url 80 43h
访问
curl
curl http://prod.svc.com/prod/hello, 无法获取数据
Describe the bug
curl http://prod.svc.com/prod/hello, 无法获取数据
以下是日志:
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response