public void apply(List<Manifest> manifests) throws HyscaleException {
        if (manifests == null || manifests.isEmpty()) {
            logger.error("Found empty manifests to deploy ");
            throw new HyscaleException(DeployerErrorCodes.MANIFEST_REQUIRED);
        }
        createNamespaceIfNotExists();
        List<String> appliedKinds = new ArrayList<>();
        List<CustomObject> customObjects = new ArrayList<>();
        List<KubernetesResource> kubernetesResourceList = new ArrayList<>();
        try {
            for (Manifest manifest : manifests) {
                CustomObject customObject = KubernetesResourceUtil.getK8sCustomObjectResource(manifest, namespace);
                appliedKinds.add(buildAppliedKindAnnotation(customObject));
                if (ResourceHandlers.getHandlerOf(customObject.getKind()) != null) {
                    kubernetesResourceList.add(KubernetesResourceUtil.getKubernetesResource(manifest, namespace));
                } else {
                    customObjects.add(customObject);
                }
            }
            applyK8sResources(kubernetesResourceList, appliedKinds);
            applyCustomResources(customObjects);
            logger.info("Successfully applied all Manifests");

        } catch (Exception e) {
            HyscaleException ex = new HyscaleException(e, DeployerErrorCodes.FAILED_TO_APPLY_MANIFEST);
            logger.error(APPLY_MANIFEST_ERROR, ex);
            throw ex;
        }
    }
Applies manifest to cluster
Use update policy if resource found on cluster otherwise create

@param manifests
@throws HyscaleException
deployer/deployer-services/src/main/java/io/hyscale/deployer/services/util/K8sResourceDispatcher.java