diff --git a/pkg/servicelb/controller.go b/pkg/servicelb/controller.go index 9010570b13..11e0bbae31 100644 --- a/pkg/servicelb/controller.go +++ b/pkg/servicelb/controller.go @@ -272,11 +272,8 @@ func (h *handler) newDeployment(svc *core.Service) (*apps.Deployment, error) { }, } - for i, port := range svc.Spec.Ports { - portName := port.Name - if portName == "" { - portName = fmt.Sprintf("port-%d", i) - } + for _, port := range svc.Spec.Ports { + portName := fmt.Sprintf("lb-port-%d", port.Port) container := core.Container{ Name: portName, Image: image,