Я пытаюсь установить соединение с веб-сокетами и использую входной контроллер nginx с помощью helm. когда я захожу в приложение через abc.com, оно не может установить соединение через веб-сокет и всегда говорит, что соединение закрыто.
Может ли кто-нибудь иметь опыт работы с этим, любые другие конфигурации, которые мне нужно сделать.
Мой файл deploy.yaml выглядит ниже -
apiVersion: v1
kind: Service
metadata:
name: creditlibraryui
namespace: kube-system
labels:
app: creditlibraryui
spec:
ports:
- port: 3000
name: http
selector:
app: creditlibraryui
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: creditlibraryui-v1
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
app: creditlibraryui
version: v1
spec:
containers:
- name: creditlibraryui
image: abc/creditlibraryui:0.0.1
imagePullPolicy: Always
ports:
- containerPort: 3000
name: http
---
apiVersion: v1
kind: Service
metadata:
name: creditlibraryservice
labels:
app: creditlibraryservice
namespace: kube-system
spec:
ports:
- port: 8102
name: http
selector:
app: creditlibraryservice
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: creditlibraryservice-v1
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
app: creditlibraryservice
version: v1
spec:
containers:
- name: creditlibraryservice
image: abc/creditlibraryservice:0.0.1
imagePullPolicy: Always
ports:
- containerPort: 8102
---
apiVersion: v1
kind: Service
metadata:
name: creditlibrarydb
labels:
app: creditlibrarydb
namespace: kube-system
spec:
ports:
- port: 27017
name: http
selector:
app: creditlibrarydb
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: creditlibrarydb-v1
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
app: creditlibrarydb
version: v1
spec:
containers:
- name: creditlibrarydb
image: mongo:latest
imagePullPolicy: Always
ports:
- containerPort: 27017
А мой ingress.yaml выглядит как -
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: creditlibrary-ingress
namespace : kube-system
annotations:
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: nginx
certmanager.k8s.io/acme-challenge-type: dns01
certmanager.k8s.io/acme-dns01-provider: cloudflare
certmanager.k8s.io/cluster-issuer: letsencrypt-staging
nginx.org/websocket-services: "creditlibraryui,creditlibraryservice"
spec:
rules:
- host: abc.com
http:
paths:
- path: "/"
backend:
serviceName: creditlibraryui
servicePort: 3000
- path: "/api"
backend:
serviceName: creditlibraryservice
servicePort: 8102
tls:
- hosts:
- "abc.com"
secretName: abc-tls