---
title: "Comment by Juan Varela on \"Deploying a Reddit Clone with Kubernetes Ingress\" | Hashnode"
description: "When I&#39;m executing kubectl apply -f Deployment.yml I get the error The connection to the server localhost:8080 was refused - did you specify the right host"
url: "https://hashnode.com/posts/deploying-a-reddit-clone-with-kubernetes-ingress/641b44460541146778a8b81a/comment/641c606188cf343b36fc70ce"
---

[Discussion](https://hashnode.com/posts/deploying-a-reddit-clone-with-kubernetes-ingress/641b44460541146778a8b81a)

Comment [Deploying a Reddit Clone with Kubernetes Ingress](https://hashnode.com/posts/deploying-a-reddit-clone-with-kubernetes-ingress/641b44460541146778a8b81a)

[Juan Varela](https://hashnode.com/@varelajuanmartin)

[Mar 23, 2023](https://hashnode.com/posts/deploying-a-reddit-clone-with-kubernetes-ingress/641b44460541146778a8b81a/comment/641c606188cf343b36fc70ce)

When I'm executing kubectl apply -f Deployment.yml I get the error The connection to the server localhost:8080 was refused - did you specify the right host or port? I am running both servers on EC2 instances and in the security gropus I've opened ports 3000, 8080, but I can't get passed this error. Thanks!
