https://bz.apache.org/bugzilla/show_bug.cgi?id=66660

--- Comment #21 from Diego Rivera <diego.riv...@armedia.com> ---
(In reply to romain.manni-bucau from comment #16)

So... I tried to configure the K8s provider as per the docs, and other
resources I found (https://github.com/devlinx9/k8s_tomcat_custer).  Per those
resources, this configuration should be both correct and sufficient:

      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
               channelStartOptions="3"
               channelSendOptions="8">
        <Channel className="org.apache.catalina.tribes.group.GroupChannel">
          <Membership
className="org.apache.catalina.tribes.membership.cloud.CloudMembershipService"/>
        </Channel>
      </Cluster>

I also set the KUBERNETES_LABELS envvar correctly (tested manually using CURL,
compared vs. what the code does), and set the KUBERNETES_NAMESPACE variable as
well.

KUBERNETES_LABELS:
"app.kubernetes.io/instance=myapp,app.kubernetes.io/name=mypod"
KUBERNETES_NAMESPACE: "default"

Basically, I did everything double-checking that the code *should* do what is
expected. Testing the direct-API access (using curl) from within the pod(s)
works just fine, so the access control is also configured correctly. I even
used the same token file as the code does by default
(/var/run/secrets/kubernetes.io/serviceaccount/token), as well as the CA
(/var/run/secrets/kubernetes.io/serviceaccount/ca.crt).

The curl version of the fetchMembers() query worked just fine.

However, I don't see any messages flowing regarding cluster members being
added/removed. Specifically, I enabled JMX and am looking at the Cluster MBeans
(Both Catalina/Cluster and ClusterChannel), and there are no members to be
found. 

The hasMembers() method even returns false!!

So ... help?

The mailing list archives only show 5 hits for KubernetesMembershipProvider,
and only one other thread for CloudMembershipService ...

Cheers...

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to