Kubernetes Cluster on AWS with Kops - NodePort Service Unavailable

Viewed 5948

I am having difficulties accessing a NodePort service on my Kubernetes cluster.

Goal

set up ALB Ingress controller so that i can use websockets and http/2

setup NodePort service as required by that controller

Steps taken

Previously a Kops (Version 1.6.2) cluster was created on AWS eu-west-1. The kops addons for nginx ingress was added as well as Kube-lego. ELB ingress working fine.

Setup the ALB Ingress Controller with custom AWS keys using IAM profile specified by that project.

Changed service type from LoadBalancer to NodePort using kubectl replace --force

> kubectl describe svc my-nodeport-service
Name:                   my-node-port-service
Namespace:              default
Labels:                 <none>
Selector:               service=my-selector
Type:                   NodePort
IP:                     100.71.211.249
Port:                   <unset> 80/TCP
NodePort:               <unset> 30176/TCP
Endpoints:              100.96.2.11:3000
Session Affinity:       None
Events:                 <none>

> kubectl describe pods my-nodeport-pod
Name:           my-nodeport-pod
Node:           <ip>.eu-west-1.compute.internal/<ip>
Labels:         service=my-selector
Status:         Running
IP:             100.96.2.11
Containers:
  update-center:
    Port:               3000/TCP
    Ready:              True
    Restart Count:      0

(ssh into node)
$ sudo netstat -nap | grep 30176
tcp6       0      0 :::30176                :::*                    LISTEN      2093/kube-proxy

Results

Curl from ALB hangs

Curl from <public ip address of all nodes>:<node port for service> hangs

Expected

Curl from both ALB and directly to the node:node-port should return 200 "Ok" (the service's http response to the root)

Update: Issues created on github referencing above with some further details in some cases:

2 Answers

The SG of master is not needed to open the nodeport range in order to make : working.

So only the Worker's SG needs to open the port range.

Related