---
title: "Comment by Vinod Vashistha on \"Deployed a Reddit Copy on Kubernetes with Ingress Enabled\" | Hashnode"
description: "Hello Shubham and Rushikesh, Thanks for the nice article. I am getting below error after I create and try to apply service. yml. My Manifesto file was done and"
url: "https://hashnode.com/posts/deployed-a-reddit-copy-on-kubernetes-with-ingress-enabled/6401184283a153ab91bbfcb9/comment/64da75234429385b928000d0"
---

[Discussion](https://hashnode.com/posts/deployed-a-reddit-copy-on-kubernetes-with-ingress-enabled/6401184283a153ab91bbfcb9)

Comment [Deployed a Reddit Copy on Kubernetes with Ingress Enabled](https://hashnode.com/posts/deployed-a-reddit-copy-on-kubernetes-with-ingress-enabled/6401184283a153ab91bbfcb9)

[Vinod Vashistha](https://hashnode.com/@vashisthavinod)

[Aug 14, 2023](https://hashnode.com/posts/deployed-a-reddit-copy-on-kubernetes-with-ingress-enabled/6401184283a153ab91bbfcb9/comment/64da75234429385b928000d0)

Hello Shubham and Rushikesh,

Thanks for the nice article. I am getting below error after I create and try to apply service. yml. My Manifesto file was done and I was able to get the same, yet each time I do service, I get the following error. Please tell me how to get rid of this.

ubuntu@ip-172-31-39-240:~/k8s$ kubectl apply -f Service.yml Unable to connect to the server: net/http: TLS handshake timeout

ubuntu@ip-172-31-39-240:~/k8s$ pwd /home/ubuntu/k8s ubuntu@ip-172-31-39-240:~/k8s$ ls -lrt

ubuntu@ip-172-31-39-240:~/k8s$ cat Service.yml apiVersion: v1 kind: Service metadata: name: reddit-clone-service labels: app: reddit-clone spec: type: NodePort ports:

-   port: 3000 targetPort: 3000 nodePort: 31000 selector: app: reddit-clone

ubuntu@ip-172-31-39-240:~/k8s$ kubectl get deployment Unable to connect to the server: net/http: TLS handshake timeout ubuntu@ip-172-31-39-240:~/k8s$

[Rushikesh Mashidkar](https://hashnode.com/@RishikeshOps)

[Aug 14, 2023](https://hashnode.com/posts/deployed-a-reddit-copy-on-kubernetes-with-ingress-enabled/6401184283a153ab91bbfcb9/comment/64da75234429385b928000d0#reply-64da76306203e95780d64717)

Hey there 👋 Use following commands and try again:

1.  mkdir -p $HOME/.kube
    
2.  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
    

3.sudo chown $(id -u):$(id -g) $HOME/.kube/config

Make sure your cluster is in running state and ports open

[Vinod Vashistha](https://hashnode.com/@vashisthavinod)

[Aug 15, 2023](https://hashnode.com/posts/deployed-a-reddit-copy-on-kubernetes-with-ingress-enabled/6401184283a153ab91bbfcb9/comment/64da75234429385b928000d0#reply-64dbb3b96203e95780d6658f)

[Rushikesh Mashidkar](https://hashnode.com/@RushikeshOps) Hello Rushikesh,

Thanks for your prompt response. I terminated the instances; re-created the instances and opened the inbound rules for SSH and HTTPS. It worked.

Thanks a lot!
