+#Install addons
+printf "Installing KUD addons\n"
+pushd /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/addons
+/opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f prerequisites.yaml -v values.yaml
+/opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f composite-app.yaml -v values.yaml
+popd
+
+#Wait for addons to be ready
+# The deployment intent group status reports instantiated before all
+# Pods are ready, so wait for the instance label (.spec.version) of
+# the deployment intent group instead.
+status="Pending"
+for try in {0..19}; do
+ printf "Waiting for KUD addons to be ready\n"
+ sleep 30s
+ if KUBECONFIG=${CLUSTER_KUBECONFIG} kubectl wait pod -l app.kubernetes.io/instance=r1 --for=condition=Ready --all-namespaces --timeout=0s 2>/dev/null >/dev/null; then
+ status="Ready"
+ break
+ fi
+done
+[[ $status == "Ready" ]]
+
+#Install addon resources
+printf "Installing KUD addon resources\n"
+pushd /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/addons
+/opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f composite-app.yaml -v values-resources.yaml
+popd
+
+#Wait for addon resources to be ready
+status="Pending"
+for try in {0..9}; do
+ printf "Waiting for KUD addon resources to be ready\n"
+ sleep 30s
+ if KUBECONFIG=${CLUSTER_KUBECONFIG} kubectl wait pod -l app.kubernetes.io/instance=r1 --for=condition=Ready --all-namespaces --timeout=0s 2>/dev/null >/dev/null; then
+ status="Ready"
+ break
+ fi
+done
+[[ $status == "Ready" ]]