When deploying a swarm to kubernetes are swarm labels secrets, config still available and accessible through /var/run/docker.sock?
I am asking since I have a custom Spring Cloud Gateway implementation that uses Docker Swarm metadata to configure the routing much like Traefik does.
You cannot just deploy a swarm to Kubernetes. You will need to translate the Docker compose files to Kubernetes deployments. If that is done correctly lables, secrets, etc should be available in Kubernetes.
However you will probably need to adjust the code for your custom ingress controller as this highly depends on the Kubernetes API. A proper ingress controller will query the Kubernetes API for Services, Ingresses and Secrets and listen for changes. Check this blog on detailed instructions.
However I would recommend to check the list of available ingress controllers before trying to develop a custom ingress controller.