1

I’ve been using shiny proxy on AKS for the past couple of months and it’s been fantastic, no problems at all, however, the need for a more secure setup has arised, and I have to use it behind an Azure Application Gateway (v2) with WAF and TLS certifcates (on the AGW). The deployments happen with no problems whatsoever, but, upon trying to access the Application I always get a “404 Not Found”, also the health probes always throw "no Results" has anyone been through this before? Here is my Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{lvappname}}-proxy
  namespace: {{ns}}
  labels:
    app: {{lvappname}}
spec:
  selector:
    matchLabels:
      run: {{lvappname}}-proxy
  replicas: 1
  template:
    metadata:
      labels:
        run: {{lvappname}}-proxy
    spec:
      containers:
      - name: {{lvappname}}-proxy
        image: {{server}}/shiny-app/{{lvappname}}-shiny-proxy-application:{{TAG}}
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8080
      - name: kube-proxy-sidecar
        image: {{server}}/shiny-app/{{lvappname}}-kube-proxy-sidecar:{{TAG}}
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8001

And here is my Service and Ingress

kind: Service
apiVersion: v1
metadata:
  name: {{lvappname}}-proxy
  namespace: {{ns}}
  labels:
    app: {{lvappname}}
    tier: frontend
spec:
  selector:
    app: {{lvappname}}-proxy
    tier: frontend
  ports:
  - protocol: TCP
    port: 80
    targetPort: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: {{lvappname}}-proxy
  namespace: {{ns}}
  annotations:
    kubernetes.io/ingress.class: azure/application-gateway
    cert-manager.io/cluster-issuer: letsencrypt-staging-application-gateway
    appgw.ingress.kubernetes.io/health-probe-status-codes: "200-399,404"
    appgw.ingress.kubernetes.io/health-probe-path: "/"
  labels:
    app: {{lvappname}}
spec:
  rules:
  - host: {{lvappname}}-{{lvstage}}.{{domain}}
    http:
      paths:
      - path: /
        backend:
          service:
            name: {{lvappname}}-proxy
            port: 
              number: 8080
        pathType: Prefix
  tls:
    - hosts:
        - {{lvappname}}-{{lvstage}}.{{domain}}
      secretName: {{lvappname}}-{{lvstage}}.{{domain}}-secret-name

and here is my shinyproxy configuration file

proxy:
  port: 8080
  authentication: none
  landing-page: /app/{{lvappname}}
  hide-navbar: true
  container-backend: kubernetes
  kubernetes:
    namespace: {{ns}}
    image-pull-policy: IfNotPresent
    image-pull-secret: {{lvappname}}-secret
  
  specs:
  - id: {{lvappname}}
    display-name: {{lvappname}} application
    description: Application for {{lvappname}}
    container-cmd: ["R", "-e", "shiny::runApp('/app/Shiny')"]    
    container-image: {{server}}/shiny-app/{{lvappname}}:{{TAG}}

server:
  servlet.session.timeout: 3600

spring:
  session:
    store-type: redis
  redis:
    host: redis-leader

Any Help would be deeply appreciated

Thank you all in advance

0 Answers0