That can :
gcloud iam service-accounts create SA_NAME --description="DESCRIPTION" \
--display-name="DISPLAY_NAME"
gcloud iam service-accounts add-iam-policy-binding SA_NAME@PROJECT_ID.iam.gserviceaccount.com \
--member="user:USER_EMAIL" \
--role="roles/iam.serviceAccountUser"The roles you should assign to this service account are:
// M1 chip
docker buildx build --platform linux/amd64 -t eu.gcr.io/{NAME OF REPOSITORY}/{NAME OF THE IMAGE}:{VERSION} .
// Other chip
docker build -t eu.gcr.io/{NAME OF REPOSITORY}/{NAME OF THE IMAGE}:{VERSION} .1) You can choose between several registries:
asia.gcr.io
2) Tag the image with its target path in Container Registry and the project ID
The image is created
docker push eu.gcr.io/jmblog-f76d7/jmblog-front:1.0.0-betaAnd the image is now available in the container Registry
Create a deployment
1- Choose Deploy
2- Select the container image & choose the region & the zone for your deployment
Create a deployment
3- Go to Workloads and you will see your deployment
You can see in details the 3 pods of the application running
But no exposing services, my application it's not accessible from outside
Expose a deployment
kubectl expose deployment jmablog --name=jmablog-service --type=LoadBalancer --port 80
/ --target-port 8080 -n jmablogExpose the deployment "jmablog" with a LoadBalancer in the namespace "jmablog"
Now my application is accessible from an external IP Adress
gcloud container clusters delete --zone=europe-west9-c jmablog-cluster
gcloud container images delete eu.gcr.io/jmblog-f76d7/jmblog-front:1.0.0-betaOr you can dot it from the GCP interface