In this section, we would invoke the microservices that was deployed in earlier article. You can use a tool like CURL to invoke the echo micro service as shown below.
> curl –request POST \
–header “content-type:application/json” \
–data ‘{“message”:”hello echo”}’ \
“https://apis.navveenbalani.dev/echo?key=AIzaSyC0m7d4cc-jOwJ“
(replace AIzaSyC0m7d4cc-jOwJ with your endpoint key)
You would see the response message being printed in the console.
Next, execute the fetchWebsite service.
> curl -i https://apis.navveenbalani.dev/fetchWebsite?key=AIzaSyC0m7d4cc-jOwJ
You would see the message “ok’ being printed on the console, denoting that your service can access internet (external IP) from your private kubernetes cluster through Cloud NAT.
Figure 27: Output of curl invocation
Next, we would whitelist the IPs that can access our service. We would use Cloud Armor and configure it with our kubernetes cluster.