Session expired for tomcat server in Kubernetes with replication

11/6/2020

we had set up Kubernetes on aks we have load balancer for tomcat service with 2 replicas but when we login our application using external IP (load balancer) we are getting an error saying that" session is expired and please login again" can anyone help me out.

Below are the YML files

Tomcat deployment file

- apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: tomcat
  spec:
    replicas: 2
    selector:
      matchLabels:
         app: tomcat
    strategy: {}
    template:
      metadata:
        labels:
          app: tomcat
      spec:
        containers:
        - image: (customimage):latest
          imagePullPolicy: ""
          name: tomcat-container
          ports:
          - containerPort: 8080

Service File

- apiVersion: v1
  kind: Service
  metadata:
    name: tomcat
  spec:
    type: LoadBalancer
    ports:
    - name: http
      protocol: TCP
      port: 8080
      targetPort: 8080
    selector:
       app: tomcat
-- ananth devulapalli
azure-aks
kubernetes
kubernetes-ingress
tomcat9

0 Answers