'Is anyone else experiencing issues using Cloud Tools for Visual Studio to deploy GKE workloads?
For the past week we are seeing the error "Could not determine if the selected GCP project is ready for deployment, please close the dialog and try again", image below:
It happens more often than not, and it is now impacting our deployment capability. This is from Visual Studio 2019 and 2022.
We tried reinstalling/updating the Cloud Tools add-in, and also upgrading Google SDK and kubectl. Unfortunately, the issue persists.
Any advice on you to troubleshoot and resolve this? Thanks!
Solution 1:[1]
[UPDATE] google cloud visual studio tool are not supported anymore https://github.com/GoogleCloudPlatform/google-cloud-visualstudio/issues/1121
Here my Workaround
first of all you need to install docker desktop
right click on project -> Add -> Docker Supoport
righ click on project-> open in Terminal
you need first time authentication
gcloud auth login
gcloud container clusters get-credentials {your cluster} --region {region} --project {project}
gcloud auth configure-docker
create a script ps1
$version = [DateTimeOffset]::Now.ToUnixTimeSeconds() docker build -t gcr.io/{project}/{your deployment name}:$version . docker push gcr.io/{project}/{your deployment name}:$version $deployment_yaml = (Get-Content .\Conf\Prod\deployment.yaml) -replace "{{version}}", $version $deployment_yaml | kubectl apply -f -
here an example of deployment.yaml please note the I have added {version} placeholder
apiVersion: apps/v1
kind: Deployment
metadata:
name: {your deployment name}
spec:
replicas: 2
selector:
matchLabels:
run: {your deployment name}
template:
metadata:
creationTimestamp: null
labels:
run: {your deployment name}
spec:
containers:
- image: gcr.io/{project}/{your deployment name}:{{version}}
imagePullPolicy: IfNotPresent
name: {your deployment name}
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: "2"
memory: 2Gi
requests:
cpu: "2"
memory: 2Gi
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |