title: Error on Websocket Implementation on Azure Kubernetes Cluster Not working
body: <p>I am trying to make the websocket service work on Azure Kubernetes Cluster on our organization environment.
  My existing environment also have REST api and Angular application working on ingress with ssl.
  But when I added the websocket service on the ingress it is not working.</p>
  
  <p>So, I tried to use Azure Free Subscription to first implement the same WITHOUT SSL. For my applications I enabled Http Routing and using the annotation addon-http-application-routing.</p>
  
  <p>I am getting below error.
  <strong>'ws://40.119.7.246/ws' failed: Error during WebSocket handshake: Unexpected response code: 404</strong></p>
  
  <p>Please help in validating where I am doing wrong?</p>
  
  <p>Below are the details of the configuration.</p>
  
  <blockquote>
    <p>Dockerfile</p>
  </blockquote>
  
  <pre><code>FROM node:alpine
  WORKDIR /app
  COPY package*.json /app/
  RUN npm install
  
  COPY ./ /app/
  RUN npm run build
  
  CMD ["node","./dist/server.js"]
  
  EXPOSE 8010
  </code></pre>
  
  <blockquote>
    <p>socketserver.yaml - Contains Demployment &amp; Service.</p>
  </blockquote>
  
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: socketserver
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: socketserver
    template:
      metadata:
        labels:
          app: socketserver
      spec:
        containers:
        - name: socketserver
          image: regkompella.azurecr.io/socketserver:1.0.0
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              memory: "128Mi"
              cpu: "500m"
          ports:
          - containerPort: 8010
        imagePullSecrets:
        - name: regkompella-azurecr-io
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: socketserver-svc
  spec:
    ports:
    - port: 80
      protocol: TCP
      targetPort: 8010
    selector:
      app: socketserver
    type: ClusterIP
  ---
  </code></pre>
  
  <blockquote>
    <p>ingress.yaml</p>
  </blockquote>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: demo-ingress
    annotations:
      kubernetes.io/ingress.class: addon-http-application-routing
      nginx.ingress.kubernetes.io/cors-allow-methods: "GET, PUT, POST, DELETE, OPTIONS"
      nginx.ingress.kubernetes.io/rewrite-target: /
      nginx.ingress.kubernetes.io/proxy-body-size: 10m
      nginx.ingress.kubernetes.io/websocket-services: socketserver-svc
      nginx.org/websocket-services: socketserver-svc
  spec:
    rules:
    - host: demosocket.com
    - http:
        paths:
        - path: /
          backend:
            serviceName: angular-application-svc
            servicePort: 80
        - path: /ws
          backend:
            serviceName: socketserver-svc
            servicePort: 80
  </code></pre>