diff --git a/examples/selenium/README.md b/examples/selenium/README.md index b3051fc79b6..88753dfc9df 100644 --- a/examples/selenium/README.md +++ b/examples/selenium/README.md @@ -59,7 +59,7 @@ curl http://localhost:4444 If you are using Google Container Engine, you can expose your hub via the internet. This is a bad idea for many reasons, but you can do it as follows: ```console -kubectl expose rc selenium-hub --name=selenium-hub-external --labels="app=selenium-hub,external=true" --create-external-load-balancer=true +kubectl expose rc selenium-hub --name=selenium-hub-external --labels="app=selenium-hub,external=true" --type=LoadBalancer ``` Then wait a few minutes, eventually your new `selenium-hub-external` service will be assigned a load balanced IP from gcloud. Once `kubectl get svc selenium-hub-external` shows two IPs, run this snippet. diff --git a/hack/verify-flags/known-flags.txt b/hack/verify-flags/known-flags.txt index f43cc1c6d53..f2b64c149db 100644 --- a/hack/verify-flags/known-flags.txt +++ b/hack/verify-flags/known-flags.txt @@ -120,7 +120,6 @@ controller-start-interval cors-allowed-origins cpu-cfs-quota cpu-percent -create-external-load-balancer current-release-pr current-replicas daemonset-lookup-cache-size diff --git a/pkg/kubectl/cmd/expose.go b/pkg/kubectl/cmd/expose.go index 1efd199cba6..a2f59084e80 100644 --- a/pkg/kubectl/cmd/expose.go +++ b/pkg/kubectl/cmd/expose.go @@ -100,9 +100,6 @@ func NewCmdExposeService(f cmdutil.Factory, out io.Writer) *cobra.Command { cmd.Flags().String("protocol", "", "The network protocol for the service to be created. Default is 'TCP'.") cmd.Flags().String("port", "", "The port that the service should serve on. Copied from the resource being exposed, if unspecified") cmd.Flags().String("type", "", "Type for this service: ClusterIP, NodePort, or LoadBalancer. Default is 'ClusterIP'.") - // TODO: remove create-external-load-balancer in code on or after Aug 25, 2016. - cmd.Flags().Bool("create-external-load-balancer", false, "If true, create an external load balancer for this service (trumped by --type). Implementation is cloud provider dependent. Default is 'false'.") - cmd.Flags().MarkDeprecated("create-external-load-balancer", "use --type=\"LoadBalancer\" instead") cmd.Flags().String("load-balancer-ip", "", "IP to assign to the Load Balancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).") cmd.Flags().String("selector", "", "A label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.") cmd.Flags().StringP("labels", "l", "", "Labels to apply to the service created by this call.") diff --git a/pkg/kubectl/service.go b/pkg/kubectl/service.go index 820f716acd2..072bddbeb03 100644 --- a/pkg/kubectl/service.go +++ b/pkg/kubectl/service.go @@ -62,7 +62,6 @@ func paramNames() []GeneratorParam { {"ports", false}, {"labels", false}, {"external-ip", false}, - {"create-external-load-balancer", false}, {"load-balancer-ip", false}, {"type", false}, {"protocol", false}, @@ -210,9 +209,6 @@ func generate(genericParams map[string]interface{}) (runtime.Object, error) { service.Spec.Ports[i].TargetPort = intstr.FromInt(int(port)) } } - if params["create-external-load-balancer"] == "true" { - service.Spec.Type = api.ServiceTypeLoadBalancer - } if len(params["external-ip"]) > 0 { service.Spec.ExternalIPs = []string{params["external-ip"]} } diff --git a/pkg/kubectl/service_test.go b/pkg/kubectl/service_test.go index 784a707ac2b..6266779c52d 100644 --- a/pkg/kubectl/service_test.go +++ b/pkg/kubectl/service_test.go @@ -154,13 +154,13 @@ func TestGenerateService(t *testing.T) { { generator: ServiceGeneratorV2{}, params: map[string]interface{}{ - "selector": "foo=bar,baz=blah", - "name": "test", - "port": "80", - "protocol": "UDP", - "container-port": "foobar", - "external-ip": "1.2.3.4", - "create-external-load-balancer": "true", + "selector": "foo=bar,baz=blah", + "name": "test", + "port": "80", + "protocol": "UDP", + "container-port": "foobar", + "external-ip": "1.2.3.4", + "type": "LoadBalancer", }, expected: api.Service{ ObjectMeta: metav1.ObjectMeta{