[QUESTION/HELP] Cannot establish websocket connections with pods in k3d-deployed clusters #979
-
Question / Where do you need Help?Unsure if this is a bug or user error, but my problem is twofold:
gbates@tensorbook:~/Projects/anno $ k3d cluster create anno --config k3d.yaml
INFO[0000] Using config file k3d.yaml (k3d.io/v1alpha4#simple)
FATA[0000] failed to transform ports: port-mapping of type 'proxy' specified, but loadbalancer is disabled Scope of your QuestionIs your question related to a specific version of k3d (or k3s)? Not to my knowledge. This is my first use of k3d (coming from minikube), so I've only ever used this version. Version:
Additional InfoI've tailed the servicelb container logs, all traefik pod logs, and our websocket application pod logs, but see no activity when visiting
apiVersion: k3d.io/v1alpha4
kind: Simple
metadata:
name: anno
servers: 1
agents: 3
kubeAPI:
hostIP: "0.0.0.0"
hostPort: "6445"
volumes:
- volume: /opt/k3s:/var/lib/rancher/k3s/storage@all
nodeFilters:
- server:0
- agent:*
ports:
- port: 8080:32080
nodeFilters:
- agent:*
# Use these for nginx ingress controller (if using)
# - port: 8080:32080
# nodeFilters:
# - server:*
# - port: 8081:32081
# nodeFilters:
# - server:*
registries:
create:
name: registry.localhost
host: "0.0.0.0"
hostPort: "5000"
options:
k3d:
timeout: "60s"
disableLoadbalancer: true
# loadbalancer:
# configOverrides:
# - settings.workerConnections=2048
# Use this to disable traefik
# k3s:
# extraArgs: # additional arguments passed to the `k3s server|agent` command; same as `--k3s-arg`
# - arg: --disable=traefik
# nodeFilters:
# - server:*
apiVersion: k3d.io/v1alpha4
kind: Simple
metadata:
name: anno
servers: 1
agents: 3
kubeAPI:
hostIP: "0.0.0.0"
hostPort: "6445"
volumes:
- volume: /opt/k3s:/var/lib/rancher/k3s/storage@all
nodeFilters:
- server:0
- agent:*
ports:
- port: 8080:80
nodeFilters:
- server:*
# Use these for nginx ingress controller (if using)
# - port: 8080:32080
# nodeFilters:
# - server:*
# - port: 8081:32081
# nodeFilters:
# - server:*
registries:
create:
name: registry.localhost
host: "0.0.0.0"
hostPort: "5000"
options:
k3d:
timeout: "60s"
loadbalancer:
configOverrides:
- settings.workerConnections=2048
# Use this to disable traefik
# k3s:
# extraArgs: # additional arguments passed to the `k3s server|agent` command; same as `--k3s-arg`
# - arg: --disable=traefik
# nodeFilters:
# - server:*
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: anno-engine
annotations:
ingress.kubernetes.io/ssl-redirect: "false"
labels:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/instance: anno
app.kubernetes.io/part-of: engine
helm.sh/chart: engine-1.0.0
spec:
rules:
- http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: anno-engine-api
port:
number: 9000
- path: /docs
pathType: Prefix
backend:
service:
name: anno-engine-api
port:
number: 9000
- path: /openapi.json
pathType: Prefix
backend:
service:
name: anno-engine-api
port:
number: 9000
- path: /files
pathType: Prefix
backend:
service:
name: anno-tusd
port:
number: 80
- path: /auth
pathType: Prefix
backend:
service:
name: anno-keycloak-http
port:
number: 80
- path: /
pathType: Prefix
backend:
service:
name: anno-engine-ui
port:
number: 3000
- path: /connect
pathType: Prefix
backend:
service:
name: anno-engine-websocket-service
port:
number: 9000 If there's any other info you need I'm happy to provide it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @gbates101 , thanks for opening this issue!
ports:
- port: 8080:32080
nodeFilters:
- agent:0:direct # direct: do not go via k3d-proxy (doesn't exist anyway now), 0: because you cannot direct map the same port to multiple containers For the other part: k3d-proxy does a simple |
Beta Was this translation helpful? Give feedback.
Hi @gbates101 , thanks for opening this issue!
Here's the solution to the actual k3d issue part:
For the other part: k3d-proxy does a simple
proxy_pass
and nothing else, so I wonder how it could be blocking here, but you can check the logs inside 👍