diff --git a/src/go/rpk/pkg/cli/container/start.go b/src/go/rpk/pkg/cli/container/start.go index 37f09c1908e49..8aa6c164acdff 100644 --- a/src/go/rpk/pkg/cli/container/start.go +++ b/src/go/rpk/pkg/cli/container/start.go @@ -322,9 +322,9 @@ func startCluster( seedID, nodeAddr(seedKafkaPort), } - kafkaAddr := []string{fmt.Sprintf("%v:%d", seedState.ContainerIP, seedKafkaPort)} - srAddr := []string{fmt.Sprintf("http://rp-node-%d:%d", seedID, seedSchemaRegPort)} - adminAddr := []string{fmt.Sprintf("http://rp-node-%d:%d", seedID, seedAdminPort)} + kafkaAddr := []string{fmt.Sprintf("%v:%d", seedState.ContainerIP, config.DefaultKafkaPort)} + srAddr := []string{fmt.Sprintf("http://rp-node-%d:%d", seedID, config.DefaultSchemaRegPort)} + adminAddr := []string{fmt.Sprintf("http://rp-node-%d:%d", seedID, config.DefaultAdminPort)} nodes := []node{seedNode} @@ -374,9 +374,9 @@ func startCluster( id: id, addr: nodeAddr(state.HostKafkaPort), }) - kafkaAddr = append(kafkaAddr, fmt.Sprintf("%v:%d", state.ContainerIP, kafkaPort)) - srAddr = append(srAddr, fmt.Sprintf("http://rp-node-%d:%d", id, schemaRegPort)) - adminAddr = append(adminAddr, fmt.Sprintf("http://rp-node-%d:%d", id, adminPort)) + kafkaAddr = append(kafkaAddr, fmt.Sprintf("%v:%d", state.ContainerIP, config.DefaultKafkaPort)) + srAddr = append(srAddr, fmt.Sprintf("http://rp-node-%d:%d", id, config.DefaultSchemaRegPort)) + adminAddr = append(adminAddr, fmt.Sprintf("http://rp-node-%d:%d", id, config.DefaultAdminPort)) mu.Unlock() return nil })