Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to apply deployment #53

Open
videlanicolas opened this issue Jun 9, 2022 · 8 comments
Open

Failed to apply deployment #53

videlanicolas opened this issue Jun 9, 2022 · 8 comments

Comments

@videlanicolas
Copy link
Contributor

Brand new GCP project, after I run:

$ ACCOUNT=$(gcloud config get-value account) && \
  gcloud builds submit \
    --project=${PROJECT_ID?} \
    --substitutions=_USER=${ACCOUNT?},_REGION=${REGION?}

I get the following error:

Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": error: unable to recognize "STDIN": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error: failed to apply deployment: failed to apply CustomResourceDefinition configuration file with name "istiocontrolplanes.install.istio.io" to cluster: failed to apply config from string: command to apply kubernetes config from string to cluster failed: exit status 1

I think the error is at https://github.com/selkies-project/selkies/blob/master/setup/manifests/deploy.sh:

log_cyan "Installing CRDs"
gke-deploy apply --project ${PROJECT_ID} --cluster ${CLUSTER_NAME} --location ${CLUSTER_LOCATION} --filename /opt/istio-operator/deploy/crds/istio_v1alpha2_istiocontrolplane_crd.yaml
gke-deploy apply --project ${PROJECT_ID} --cluster ${CLUSTER_NAME} --location ${CLUSTER_LOCATION} --filename base/pod-broker/crd.yaml

But I'm no expert. Will continue debugging this.

@videlanicolas
Copy link
Contributor Author

Seems like apiextensions.k8s.io/v1beta1 is [deprecated](https://kubernetes.io/blog/2021/07/14/upcoming-changes-in-kubernetes-1-22/#:~:text=The%20beta%20CustomResourceDefinition%20API%20(apiextensions.k8s.io/v1beta1). We should migrate to apiregistration.k8s.io/v1.

@videlanicolas
Copy link
Contributor Author

This failes at this setp actually: https://github.com/selkies-project/selkies/blob/8fa16a1eb02562f8bf16adc847f122bd68d88726/setup/manifests/deploy.sh#L69

We need to update /opt/istio-operator/deploy/crds/istio_v1alpha2_istiocontrolplane_crd.yaml to use apiregistration.k8s.io/v1. This file is downloaded from https://github.com/istio/operator, so we need to update https://github.com/istio/operator/blob/master/deploy/crds/istio_v1alpha1_istiooperator_crd.yaml.

@videlanicolas
Copy link
Contributor Author

Well, the repo referenced above has been archived, so we should migrate this project to use Istio's new repo.

@videlanicolas
Copy link
Contributor Author

We should also update CNRM version, since they are using the deprecated API as well: https://github.com/selkies-project/selkies/blob/385aa326b7ac9bd8866378cf399194db225d39d2/images/installer/Dockerfile#L26

@videlanicolas
Copy link
Contributor Author

There's another API that needs to be migrated: admissionregistration.k8s.io/v1beta1.

It appears that Kubernetes 1.22 breaks a lot of things in this repo, we should update it so that fresh installs still work.

@videlanicolas
Copy link
Contributor Author

I think the solution to this issue is to migrate this project to use https://github.com/istio/istio/tree/master/operator newer repo instead of the archived one.

@videlanicolas
Copy link
Contributor Author

After #64 I ran git pull on my project and re-deployed, it fixed the error in this issue.

But it encountered another error:


Step #10 - "deploy-cluster-manifests-region": BUILD FAILURE: Build step failure: build step 1 "gcr.io/<PROJECT ID>/broker-installer" failed: step exited with non-zero status: 1
Step #10 - "deploy-cluster-manifests-region": ERROR: (gcloud.builds.submit) build 1a9cd776-fce1-42d1-b4d0-a3d2a7649c35 completed with status "FAILURE"
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": namespace/autoneg-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": serviceaccount/autoneg-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": role.rbac.authorization.k8s.io/autoneg-leader-election-role created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrole.rbac.authorization.k8s.io/autoneg-manager-role created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrole.rbac.authorization.k8s.io/autoneg-proxy-role created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": rolebinding.rbac.authorization.k8s.io/autoneg-leader-election-rolebinding created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrolebinding.rbac.authorization.k8s.io/autoneg-manager-rolebinding created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrolebinding.rbac.authorization.k8s.io/autoneg-proxy-rolebinding created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": service/autoneg-controller-manager-metrics-service created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": deployment.apps/autoneg-controller-manager created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Checking existing istio installation
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": no running Istio pods in "istio-system"
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Installing istio 1.14
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Installing Istio control plane...
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/authorizationpolicies.security.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/destinationrules.networking.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/envoyfilters.networking.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/gateways.networking.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/istiooperators.install.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/peerauthentications.security.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/proxyconfigs.networking.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/requestauthentications.security.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/serviceentries.networking.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/sidecars.networking.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/telemetries.telemetry.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/virtualservices.networking.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/wasmplugins.extensions.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/workloadentries.networking.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": customresourcedefinition.apiextensions.k8s.io/workloadgroups.networking.istio.io created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrole.rbac.authorization.k8s.io/istio-reader-clusterrole-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrole.rbac.authorization.k8s.io/istio-reader-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrole.rbac.authorization.k8s.io/istiod-clusterrole-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrole.rbac.authorization.k8s.io/istiod-gateway-controller-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrole.rbac.authorization.k8s.io/istiod-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrolebinding.rbac.authorization.k8s.io/istio-reader-clusterrole-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrolebinding.rbac.authorization.k8s.io/istio-reader-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrolebinding.rbac.authorization.k8s.io/istiod-clusterrole-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrolebinding.rbac.authorization.k8s.io/istiod-gateway-controller-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": clusterrolebinding.rbac.authorization.k8s.io/istiod-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": validatingwebhookconfiguration.admissionregistration.k8s.io/istio-validator-istio-system created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": mutatingwebhookconfiguration.admissionregistration.k8s.io/istio-sidecar-injector created
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Warning: policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": unable to recognize "STDIN": no matches for kind "EnvoyFilter" in version "networking.istio.io/v1alpha3"
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Step #1 - "deploy-manifests": Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found
Step #10 - "deploy-cluster-manifests-region": Finished Step #1 - "deploy-manifests"
Step #10 - "deploy-cluster-manifests-region": ERROR
Step #10 - "deploy-cluster-manifests-region": ERROR: build step 1 "gcr.io/<PROJECT ID>/broker-installer" failed: step exited with non-zero status: 1
Step #10 - "deploy-cluster-manifests-region": --------------------------------------------------------------------------------

@videlanicolas
Copy link
Contributor Author

Two notable things pop in here:

Warning: policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget

This might relate to kustomization.yaml, so maybe increasing the version to v1 would be enough?

And:

Error from server (NotFound): error when creating "STDIN": namespaces "istio-system" not found

I guess this means the previous step failed: Step #10 - "deploy-cluster-manifests-region": ERROR: (gcloud.builds.submit) build 1a9cd776-fce1-42d1-b4d0-a3d2a7649c35 completed with status "FAILURE", not sure what causes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant