Giter Club home page Giter Club logo

Comments (7)

bprashanth avatar bprashanth commented on June 18, 2024

I haven't looked at the code but i can tell you how to figure it out. Replace https://github.com/kubernetes/contrib/blob/master/service-loadbalancer/service_loadbalancer.go#L522 with:

    if *dry {
        kubeClient = client.NewOrDie(&client.Config{Host: "http://127.0.0.1:8001", Version: "v1"})
    } else if *cluster {
        if kubeClient, err = client.NewInCluster(); err != nil {
            glog.Fatalf("Failed to create client: %v", err)
        }
    } else {
        config, err := clientConfig.ClientConfig()
        if err != nil {
            glog.Fatalf("error connecting to the client: %v", err)
        }
        kubeClient, err = unversioned.New(config)
    }

Create a tcp service like: https://github.com/kubernetes/contrib/tree/master/service-loadbalancer#tcp, run kubectl proxy on localhost pointed at your remote cluster, and observe the haproxy config the loadbalancer spits out when you run (on the same machine kubectl proxy is running on):

service_loadbalancer --dry --tcp-services=mysql:3306

If there's a bug, submit a pr :)
Also feel free to submit the snippet that allows *dry above as a pr if you have time.

from contrib.

jayunit100 avatar jayunit100 commented on June 18, 2024

Thanks ! I'll try to mock this out now, and pr a fix+ update Docs accordingly also.

from contrib.

bprashanth avatar bprashanth commented on June 18, 2024

I'm pretty sure --tcp-services is WIA btw, I just used mysql in my cluster.

from contrib.

jayunit100 avatar jayunit100 commented on June 18, 2024

WIA = "working in action"?

from contrib.

bprashanth avatar bprashanth commented on June 18, 2024

I mean wai

from contrib.

jayunit100 avatar jayunit100 commented on June 18, 2024

ah ok, "working as-is" :) . Will look deeper now while I test it.

from contrib.

jayunit100 avatar jayunit100 commented on June 18, 2024

not a bug , looked closer and the tcpServices was in a struct to begin with, got it confused with the string arg inside the struct .

from contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.