skip to Main Content

I did an AKS tutorial and deployed to Azure. I could have torn the site down immediately so that I wouldn’t have to pay, but I decided to leave it up for a few days just to see what the cost would look like for a site with no traffic. I checked it for a few days in a row and it didn’t seem to be incurring any charges (or at least not more than a some odd number of cents). Then I forgot about it and left it for the rest of the month. When I finally checked it again it had scaled up and was charging me like 4 or 5 bucks a day for the virtual machines. The site itself was basically just a hello world program, and there was no reason for anyone to be using it.

My hope was that when no real users were using the site, it could basically shut off and the charges would be close to nothing. Is this simply the cost of doing business, or are there any techniques to mitigate the cost of serving unwanted visitors?

2

Answers


  1. I agree forgetting a running resource azure is annoying.
    In Azure you always Pay for VMs, associated storage, and network resources used.

    To avoid that you can create Automation Account and scheduled an automatic stop of your resource.
    https://www.azureblue.io/how-to-start-stop-your-aks-cluster-on-schedule/

    hope it helps 😉

    Login or Signup to reply.
  2. One way you could possibly mitigate that would be by setting up an internal load balancer, so no one can access your app through an external network. You can also disable automatic scaling just for good measures.

    Here is a link I found, hope this will help :

    https://learn.microsoft.com/en-us/azure/aks/internal-lb

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search