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

fix: fix cluster connect --show-example #403

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/user_docs/cli/kbcli_cluster_create_elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ kbcli cluster create elasticsearch NAME [flags]
--publicly-accessible Specify whether the cluster can be accessed from the public internet.
--rbac-enabled Specify whether rbac resources will be created by client, otherwise KubeBlocks server will try to create rbac resources.
--replicas int The number of replicas, for single-node mode, the replicas is 1, for multi-node mode, the default replicas is 3. Value range [1, 5]. (default 1)
--service-version string The version of ElasticSearch. (default "8.8")
--service-version string The version of ElasticSearch. (default "8.8.2")
--storage float Storage size, the unit is Gi. Value range [1, 10000]. (default 20)
--tenancy string The tenancy of cluster. Legal values [SharedNode, DedicatedNode]. (default "SharedNode")
--termination-policy string The termination policy of cluster. Legal values [DoNotTerminate, Halt, Delete, WipeOut]. (default "Delete")
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/cluster/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (o *ConnectOptions) runShowExample() error {
// connect cluster from localhost
if o.privateEndPoint {
fmt.Fprintf(o.Out, "# cluster %s does not have public endpoints, you can run following command and connect cluster from localhost\n"+
"kubectl port-forward service/%s %s:%s\n\n", o.clusterName, o.svc.Name, info.Port, info.Port)
"kubectl port-forward -n %s service/%s %s:%s\n\n", o.clusterName, o.Namespace, o.svc.Name, info.Port, info.Port)
info.Host = "127.0.0.1"
}

Expand Down
Loading