I think you didn't explain how you set up your kibana.yml, but since it doesn't connect to the cluster you want, it must have some invalid information.
The instructions I recommend are to use docker-compose for Elasticsearch nodes and Kibana.
Read the docs on running Elasticsearch in Docker-Compose: Change Index Ingestion method
And the docs on running Kibana in Docker-compose: Change Index Ingestion method
Having all the services declared in a docker-compose.yml
file will simplify the network configuration.