Is there a hard limit on the number of service accounts that can be created in Kubernetes?
I couldn't find any documentation where this is stated.
It depends on the storage behind a service account registry, as coded in kubernetes/kubernetes/pkg/registry/core/serviceaccount
// storage puts strong typing around storage calls
type storage struct {
rest.StandardStorage
}
// NewRegistry returns a new Registry interface for the given Storage. Any mismatched
// types will panic.
func NewRegistry(s rest.StandardStorage) Registry {
return &storage{s}
}
A storage is a REST call to, for instance, an ETCD storage.
func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) {
etcdStorage, server := registrytest.NewEtcdStorage(t, "")
So this is limited by the limits of an ETCD, not so much the number of entries, but rather the storage size.