Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services-controller: Add LoadBalancer Service support #53

Merged
merged 2 commits into from
Jul 11, 2017
Merged

Conversation

bzub
Copy link
Collaborator

@bzub bzub commented Jul 11, 2017

Fixes #51

Tested with kops + AWS.

Testing steps

Start a simple http server deployment:

kubectl -n default run alpine --command --image alpine --replicas 2 --port 80 -- httpd -fv

Expose as LB type service:

kubectl -n default expose deployment alpine --port 8888 --target-port 80 --type=LoadBalancer

Check Services and EPs:

$ kubectl -n default get service,ep -o wide
NAME             CLUSTER-IP      EXTERNAL-IP                                                              PORT(S)          AGE       SELECTOR 
svc/alpine       100.69.95.246   aa5fdbd3a667c11e7b2ff0691ff4e598-286081594.us-west-2.elb.amazonaws.com   8888:32667/TCP   17m       run=alpine                                  
svc/kubernetes   100.64.0.1      <none>                                                                   443/TCP          35m       <none>   

NAME            ENDPOINTS                     AGE                      
ep/alpine       100.96.1.3:80,100.96.2.4:80   17m                      
ep/kubernetes   172.20.43.207:443             35m

Hit the external LB IP, got a 404 from the server (OK).

curl aa5fdbd3a667c11e7b2ff0691ff4e598-286081594.us-west-2.elb.amazonaws.com:8888
<HTML><HEAD><TITLE>404 Not Found</TITLE></HEAD>
<BODY><H1>404 Not Found</H1>
The requested URL was not found
</BODY></HTML>

Check http server logs:

for i in $(kubectl -n default get pods -l run=alpine --output name)
do
  kubectl -n default logs $(basename ${i})
done

output snippet:

[::ffff:172.20.43.207]:10950: response:404                             
[::ffff:172.20.56.29]:10974: response:400                              
[::ffff:100.96.1.1]:31853: response:400                                
[::ffff:172.20.43.207]:57604: response:400                             
[::ffff:172.20.56.29]:10984: response:400                              
[::ffff:100.96.1.1]:31873: response:400                                
[::ffff:172.20.43.207]:57624: response:400                             
[::ffff:172.20.56.29]:11000: response:400                              
[::ffff:100.96.1.1]:31889: response:400                                

@bzub bzub added the bug label Jul 11, 2017
@bzub bzub changed the title network-services-controller: Add LoadBalancer Service support services-controller: Add LoadBalancer Service support Jul 11, 2017
@bzub bzub merged commit a3bddf6 into master Jul 11, 2017
@bzub bzub deleted the bzub-lb-service branch July 11, 2017 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant