Site icon Learning & Doing

Debugging Apps on Google Kubernetes Engine

engine

“Debugging Apps on Google Kubernetes Engine”

Pengantar

Cloud Logging, dan alat pendampingnya, Cloud Monitoring, adalah produk berfitur lengkap yang terintegrasi secara mendalam ke dalam Google Kubernetes Engine. Lab ini mengajarkan cara kerja Cloud Logging dengan cluster dan aplikasi GKE serta beberapa praktik terbaik untuk pengumpulan log melalui kasus penggunaan logging yang umum.

Praktikum

Task 1. Infrastructure setup

gcloud config set compute/zone us-central1-b
export PROJECT_ID=$(gcloud info --format='value(config.project)')
gcloud container clusters list
gcloud container clusters get-credentials central --zone us-central1-b
kubectl get nodes

Task 2. Deploy application

git clone https://github.com/xiangshen-dk/microservices-demo.git
cd microservices-demo
kubectl apply -f release/kubernetes-manifests.yaml
kubectl get pods
export EXTERNAL_IP=$(kubectl get service frontend-external | awk 'BEGIN { cnt=0; } { cnt+=1; if (cnt > 1) print $4; }')
curl -o /dev/null -s -w "%{http_code}\n"  http://$EXTERNAL_IP

Task 3. Open the application

Task 4. Create a logs-based metric

Task 5. Create an alerting policy

Trigger an application error

Confirming the alert and application errors

Task 6. Fix the issue and verify the result

grep -A1 -ni ENABLE_RELOAD release/kubernetes-manifests.yaml
sed -i -e '373,374d' release/kubernetes-manifests.yaml
kubectl apply -f release/kubernetes-manifests.yaml

Penutup

Sahabat Blog Learning & Doing demikianlah penjelasan mengenai Debugging Apps on Google Kubernetes Engine. Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.

Exit mobile version