1
votes

I followed the official instruction and had no problem with running kie server and workbench on Docker. However, when I try with Kubernetes I bump into some problem. There is no Execution server in the list (Business Central -> Deploy -> Execution Servers). Both of them are up and running, I can access Business Central, http://localhost:31002/kie-server/services/rest/server/ is responding correctly :

<response type="SUCCESS" msg="Kie Server info">
<kie-server-info>
<capabilities>KieServer</capabilities>
<capabilities>BRM</capabilities>
<capabilities>BPM</capabilities>
<capabilities>CaseMgmt</capabilities>
<capabilities>BPM-UI</capabilities>
<capabilities>BRP</capabilities>
<capabilities>DMN</capabilities>
<capabilities>Swagger</capabilities>
<location>http://localhost:8080/kie-server/services/rest/server</location>
<messages>
<content>Server KieServerInfo{serverId='kie-server-kie-server-7fcc96f568-2gf29', version='7.45.0.Final', name='kie-server-kie-server-7fcc96f568-2gf29', location='http://localhost:8080/kie-server/services/rest/server', capabilities=[KieServer, BRM, BPM, CaseMgmt, BPM-UI, BRP, DMN, Swagger]', messages=null', mode=DEVELOPMENT}started successfully at Tue Oct 27 10:36:09 UTC 2020</content>
<severity>INFO</severity>
<timestamp>2020-10-27T10:36:09.433Z</timestamp>
</messages>
<mode>DEVELOPMENT</mode>
<name>kie-server-kie-server-7fcc96f568-2gf29</name>
<id>kie-server-kie-server-7fcc96f568-2gf29</id>
<version>7.45.0.Final</version>
</kie-server-info>
</response>

Here is my yaml file that I am using to create deployments and services

apiVersion: apps/v1
kind: Deployment
metadata:
  name: kie-wb
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kie-wb
  template:
    metadata:
      labels:
        app: kie-wb
    spec:
      containers:
        - name: kie-wb
          image: jboss/drools-workbench-showcase:latest
          ports:
            - containerPort: 8080
            - containerPort: 8001
          securityContext:
            privileged: true
---
kind: Service
apiVersion: v1
metadata:
  name: kie-wb
spec:
  selector:
    app: kie-wb
  ports:
    - name: "8080"
      port: 8080
      targetPort: 8080
    - name: "8001"
      port: 8001
      targetPort: 8001
#  type: LoadBalancer
---
apiVersion: v1
kind: Service
metadata:
  name: kie-wb-np
spec:
  type: NodePort
  ports:
    - port: 8080
      targetPort: 8080
      nodePort: 31001
  selector:
    app: kie-wb
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kie-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kie
  template:
    metadata:
      labels:
        app: kie
    spec:
      containers:
        - name: kie
          image: jboss/kie-server-showcase:latest
          ports:
            - containerPort: 8080
          securityContext:
            privileged: true
---
kind: Service
apiVersion: v1
metadata:
  name: kie-server
spec:
  selector:
    app: kie
  ports:
    - name: "8080"
      port: 8080
      targetPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: kie-server-np
spec:
  type: NodePort
  ports:
    - port: 8080
      targetPort: 8080
      nodePort: 31002
  selector:
    app: kie
#  type: LoadBalancer

When deploying to Docker I am using --link drools-wb:kie-wb

docker run -p 8180:8080 -d --name kie-server --link drools-wb:kie-wb jboss/kie-server-showcase:latest

In Kubernetes I created service called kie-wb, but that doesn't help. What am I missing here?

1
Did you solve the issue?sachin
did you get this working?Gabe

1 Answers

1
votes

I was working on a similar set up and used your YAML file as a start (thanks for that)!

I had to add the following snippet to the kia-server-showcase container:

 env:
          - name: KIE_WB_ENV_KIE_CONTEXT_PATH
            value: "business-central"

It does work now, at least as far as I can tell.