diff --git a/x-pack/elastic-agent/pkg/agent/cmd/container.go b/x-pack/elastic-agent/pkg/agent/cmd/container.go index 7b1e7cea8ca..cd3a6741eca 100644 --- a/x-pack/elastic-agent/pkg/agent/cmd/container.go +++ b/x-pack/elastic-agent/pkg/agent/cmd/container.go @@ -216,7 +216,7 @@ func buildEnrollArgs(token string, policyID string) ([]string, error) { args = append(args, "--fleet-server-cert-key", certKey) } if envBool("FLEET_SERVER_INSECURE_HTTP") { - args = append(args, "--fleet-server--insecure-http") + args = append(args, "--fleet-server-insecure-http") args = append(args, "--insecure") } } else {