ClusterLayer is not part of the JSAPI, it was just used for the sample.
ArcGIS API for JavaScript Sandbox
Clustering support is implemented via the FeatureLayer with hosted feature services.
Basic clustering | ArcGIS API for JavaScript 3.24