Connection refused to gitlab.com

I’m trying to connect the kubernetes cluster to gitlab.com using this command:

helm repo add gitlab https://charts.gitlab.io
helm repo update
helm upgrade --install test-agent gitlab/gitlab-agent \
–namespace gitlab-agent-test-agent \
–create-namespace \
–set image.tag=v17.0.0-rc3 \
–set config.token=token \
–set config.kasAddress=wss://kas.gitlab.com/

But connection status of agent stay "Never connected’
I try to view the service logs

kubectl logs -f -l=app.kubernetes.io/name=gitlab-agent -n gitlab-agent-test-agent

“level”:“error”,“time”:“2024-05-06T18:52:01.461Z”,“msg”:“Failed to register agent pod. Please make sure the agent version matches the server version”,“mod_name”:“agent_registrar”,“error”:“rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: failed to WebSocket dial: failed to send handshake request: Get \"https://kas.gitlab.com/\\\”: dial tcp: lookup kas.gitlab.com on 10.96.0.10:53: read udp 10.85.0.12:54919->10.96.0.10:53: read: connection refused""}

How can I fix this?

According to the documentation: Install the GitLab agent server for Kubernetes (KAS) | GitLab KAS is only possible when running your own Gitlab server. Therefore, not possible on gitlab.com.

I could be wrong, but at least I cannot find any Gitlab documentation that mentions using KAS on gitlab.com.

I tried the same thing on own Gitlab server,same result.