public MongoDBContainer withSharding() {
        this.shardingEnabled = true;
        getContainerDef().withSharding();
        return this;
    }
Enables sharding on the cluster

@return this
modules/mongodb/src/main/java/org/testcontainers/containers/MongoDBContainer.java