This will create a Kubernetes Service of type ExternalName which will expose host.docker.internal, which will resolve to the host machine's IP address.
Create a file docker-connect.yml
with below contents. Then do kubectl apply -f docker-connect.yml
apiVersion: v1
kind: Service
metadata:
name: docker-container-service
spec:
type: ExternalName
externalName: host.docker.internal