How to create liveness and readiness probe for a java application - RADIUS

9/2/2019

I have a java dockerized application that I want to create health check for in k8s manifests. I am unable to proceed with this as I am uncertain which url to use.

Dockerfile

;
;
;
RUN mkdir -p /opt/gluu/radius \
    && wget -q https://ox.gluu.org/maven/org/gluu/super-gluu-radius-server/${GLUU_VERSION}/super-gluu-radius-server-${GLUU_VERSION}.jar -O /opt/gluu/radius/super-gluu-radius-server.jar \
    && wget -q https://ox.gluu.org/maven/org/gluu/super-gluu-radius-server/${GLUU_VERSION}/super-gluu-radius-server-${GLUU_VERSION}-distribution.zip -O /tmp/gluu-radius-libs.zip \
    && unzip -n -q /tmp/gluu-radius-libs.zip -d /opt/gluu/radius \
    && rm /tmp/gluu-radius-libs.zip
;
;
;

Part of the entrypoint script.

# run Radius server
exec java \
    -server \
    -XX:+DisableExplicitGC \
    -XX:+UseContainerSupport \
    -XX:MaxRAMPercentage=$GLUU_MAX_RAM_PERCENTAGE \
    -Dpython.home=/opt/jython \
    -Dlog4j.configurationFile=file:/etc/gluu/conf/radius/gluu-radius-logging.xml \
    -Dradius.home=/opt/gluu/radius \
    -Dradius.base=/opt/gluu/radius \
    -Djava.io.tmpdir=/tmp \
    -cp /opt/gluu/radius/super-gluu-radius-server.jar \
    org.gluu.radius.ServerEntry /etc/gluu/conf/radius/gluu-radius.properties \

I tried to use the following without success

        livenessProbe:
          httpGet:
            path: /opt/gluu/radius
            port: radius-auth
          initialDelaySeconds: 40
          periodDelaySeconds: 40 
        readinessProbe:
          httpGet:
            path: /opt/gluu/radius
            port: radius-auth
          initialDelaySeconds: 25

Please help on this plus a description of what is expected.

-- Shammir
docker
dockerfile
java
kubernetes
radius

0 Answers