Api for Cesi Android formation
To use dockeriez app
docker build -t scastrec/chatapi .
Run it on port 8080
docker run -p 8080:8080 -d scastrec/chatapi
Open your browser on localhost:8080
- Construct the docker
gcloud docker -- push scastrec/chatapi
- Create cluster and pod in k8s.tf >
cd terraform & terraform init & terraform apply
Deploy from kubectl a pod 4. deploy a new pod with kubectl
gcloud container clusters get-credentials <YOUR_CLUSTER_NAME> --region europe-west3
kubectl create deployment chatapi-by-kube --image=docker.io/scastrec/chatapi
// attach loadbalancer
kubectl expose deployment chatapi-by-kube --type=LoadBalancer --port 80 --target-port 8080
- check pods with
kubectl get pods
. Check services withkubectl get services -w
Yeah It runs - Go to the External IP shown in get services