diff --git a/pkg/kubeapiserver/options/authentication.go b/pkg/kubeapiserver/options/authentication.go index 9e9ce159e9e..1553cec4951 100644 --- a/pkg/kubeapiserver/options/authentication.go +++ b/pkg/kubeapiserver/options/authentication.go @@ -567,7 +567,7 @@ func (o *BuiltInAuthenticationOptions) ToAuthenticationConfig() (kubeauthenticat switch { case ret.AuthenticationConfig.Anonymous != nil && o.Anonymous.FlagsSet: // Flags and config file are mutually exclusive - return kubeauthenticator.Config{}, field.Forbidden(field.NewPath("anonymous"), "--anonynous-auth flag cannot be set when anonymous field is configured in authentication configuration file") + return kubeauthenticator.Config{}, field.Forbidden(field.NewPath("anonymous"), "--anonymous-auth flag cannot be set when anonymous field is configured in authentication configuration file") case ret.AuthenticationConfig.Anonymous != nil: // Use the config-file-specified values ret.Anonymous = *ret.AuthenticationConfig.Anonymous diff --git a/pkg/kubeapiserver/options/authentication_test.go b/pkg/kubeapiserver/options/authentication_test.go index 5143ea2149c..95706ce7181 100644 --- a/pkg/kubeapiserver/options/authentication_test.go +++ b/pkg/kubeapiserver/options/authentication_test.go @@ -690,7 +690,7 @@ anonymous: enabled: true `), }, - expectErr: "--anonynous-auth flag cannot be set when anonymous field is configured in authentication configuration file", + expectErr: "--anonymous-auth flag cannot be set when anonymous field is configured in authentication configuration file", }, { name: "flag-anonymous-enabled-file-anonymous-notset-AnonymousAuthConfigurableEndpoints-enabled",