Google cloud platform free tier limits from compute engine - google-cloud-platform

In GCP, it is not notified when a virtual machine of with resources higher than the free tier limit is created. An error message of following pattern arises in the notification. So, what is the maximum allowed resourced for Google cloud platform virtual machine?
Create VM instance "instance-2" and its boot disk "instance-2"
Quota 'C2_CPUS' exceeded. Limit: 0.0 in region asia-south1.

As written in the documentation:
Compute Engine
1 non-preemptible e2-micro VM instance per month in one of the following US regions:.
Oregon: us-west1
Iowa: us-central1
South Carolina: us-east1
30 GB-months HDD.
5 GB-month snapshot storage in the following regions:.
Oregon: us-west1
Iowa: us-central1
South Carolina: us-east1
Taiwan: asia-east1
Belgium: europe-west1
1 GB network egress from North America to all region destinations (excluding China and Australia) per month
Your Free Tier e2-micro instance limit is by time, not by instance. Each month, eligible use of all of your e2-micro instances is free until you have used a number of hours equal to the total hours in the current month. Usage calculations are combined across the supported regions.
Google Cloud Free Tier does not include external IP addresses.
Compute Engine offers discounts for sustained use of virtual machines. Your Free Tier use doesn't factor into sustained use.
GPUs and TPUs are not included in the Free Tier offer. You are always charged for GPUs and TPUs that you add to VM instances.
NB: This is subject to changes, check the link for up-to-date information.
Step-by-Step guide to create a free instance:
Create instance
Now go create the instance at https://console.cloud.google.com/compute/instancesAdd
region: us-east1 or one of the region indicated in the documentation.
Select General Purpose -> N2 -> e2-micro. You will see "Your first 744 hours of e2-micro instance usage are free this month"
Select Boot disk -> public image -> ubuntu -> 20.04LS -> boot disk type: Standard persistent disk (HDD) -> size 30gb (or as per documentation)
Allow http and https traffic (or don't check the boxes, if you don't intend to use port 80 and 443)
Click on Create
You can check "view billing report" to make sure you did it right.

You can found more information at the documentation Google Cloud Free Tier:
The Google Cloud Free Tier has two parts:
A 3-month(previously 12) free trial with $300 credit to use with any Google Cloud services.
Always Free, which provides limited access to many common Google Cloud resources, free of charge.
At the section 12-month, $300 free trial you can find Program coverage details:
Your free trial credit applies to all Google Cloud resources, with the
following exceptions:
You can't have more than 8 cores (or virtual CPUs) running at the same time.
You can't add GPUs to your VM instances.
You can't request a quota increase. For an overview of Compute Engine quotas, see Resource quotas.
You can't create VM instances that are based on Windows Server images.
You must upgrade your account to perform any of the actions in the preceding list.
In addition, have a look at the End of the free trial:
The free trial ends when you use all of your credit, or after 12
months, whichever happens first. At that time, the following
conditions apply:
You must upgrade to a paid account to continue using Google Cloud.
All resources you created during the trial are stopped.
Any data you stored in Compute Engine is lost.
Your account enters a 30-day grace period, during which you can recover resources and data you stored in any Google Cloud services
during the trial period.
You might receive a message stating that your account has been canceled, which only indicates that your account has been suspended to
prevent charges.
and at the Recovering data:
Caution: There is no automated way to recover data that you used on VM instances you created with Compute Engine. You must manually
export any data that you want to keep from your Compute Engine VM
instances before the trial period ends.
I do recommend you to upgrade your account before free trial ends.

After the free trial period ends you just have to register a credit card to continue to use their services if/when you accrue charges from them. If you set it up right it might charge you .02 cents every now and then. I just set up my first one with wordpress and at first I would get charged .02cents/month but once I updated the software and the config it rarely charges me. p.s. I started getting hack attempts pretty quickly.

Related

Google cloud compute engine always free tier

I am trying to run a compute engine instance using the always free tier option. The documentation of the free tier says if it is a computer engine instance of e2-micro from certain locations, it should be free. Here is the screenshot:
Now, I have chosen e2-micro with standard persistent disk of 10GB (one can not go below 10GB in GCP platform) at us-central1 location (which is one of the free tier location). It still shows an estimate of $6.51 monthly cost. Here is the screenshot of the instance configuration:
Am I doing something wrong here? Is there any other option I need to check to make sure it stays in the always free tier?
An e2-micro instance is not (in and of itself) free. I think the estimate you are seeing is in fact the cost of running an instance. What makes it "free" is that Google will "waive" the fees for the resources described as "free tier". However, if you run more and more e2-micro instances beyond the amount offered as a "free taster" then you will be charged the rate listed.
Looking in detail at the first image that Syed posted we see the following at the bottom:
Your Free Tier e2-micro instance limit is by time, not by instance. Each month, eligible use of all of your e2-micro instance is free until you have used a number of hours equal to the total hours in the current month.
Putting it another way, you get this amount of resource for free. For example, if we assume that a month is approximately 720 hours then that is the amount of e2-micro consumption you get free in monthly billing cycle. Whether you run 1 instance of CPU consumption for the whole month or 720 instances for only 1 hour. Take care to note that resources are broken down into their chargeable components (CPU, disk, network egress).
Disclaimer: Nothing in this post should be taken as a formal Google statement ... please consult Google documentation such as Google Cloud Free Program for accurate details.

Is Google Cloud Trial enough for academic project?

We are going to use Kubernetes Engine, Cloud SQL, Storage, and possibly Nosql and cache services for our academic project.
So far we'll have 5 accounts and the project has to be running for 3 months.
Will it be enough for us? Is it possible, for example, to stop project and billing every night or even stop and start at any time?
The Google Cloud Platform (GCP) Free Tier includes $300.00 USD in credits to get started with any GCP product. Since this is an academic project, I recommend using the Google Cloud Platform Pricing Calculator to learn how to price GCP products and services - link. Also review what is included in the "Always Free Products" - link. Then there are discounts for services that run for a majority of the month - "Sustained Usage Discounts" - link.
Google Kubernetes Engine:
Kubernetes Engine is free (the worker nodes are not free).
If you select n1-standard-1 (1 vCPU, 3.75 GB mem) the cost is $24.27 per month per node. Typically you will create a three node cluster: round up to $75.00 per month.
Google Cloud SQL:
Selecting a db-pg-f1-micro (PostgreSQL) with 32 GB of SSD storage: $24.27 per month
Will it be enough for us?
As you can see, you will quickly burn thru $300.00 in credit in only three months.
Take into consideration that Google's goal is not to give away services. The goal is to introduce you to Google Cloud and provide enough services at zero or low cost so that you can complete an evaluation of Google Cloud.
Is it possible, for example, to stop project and billing every night
or even stop and start at any time?
No, you cannot start and stop billing every night. In order to stop billing for a project you must delete the project and everything in it. Some services such as Google Compute Engine (GCE) can be stopped. This stops billing for the VM instance but billing for storage, snapshots, IP addresses, etc. continues unless you delete your instances every night and recreate them each morning.
Services such as Kubernetes or Google Cloud SQL cannot be completely shutdown. Technically you could by deleting everything but then recreating everything takes more time than the savings gained. Very good for practice however.
Google Cloud services would be a great option for your circumstances.
If its budgetary constraint you may want to look into using AWS, AWS will provde you with a years time for free which would be good for your horizontal scaling with k8s
Amazon and Kubernetes

How to add the GPU in compute engine instance of google ML engine for free tier?

I try to use the google machine learning engine to train my tensorflow model. I want to use the free tier.
When I set the configuration and create new compute engine instance ( Google compute engine), I try to add the GPU too. But this gives me an error because the Google cloud give just $300 credit free tier without GPU.
Is there any way to use the GPU in free tier?
As per the Google's doc
New projects and Free Trial accounts do not receive GPU quota by default.
You must have GPU quota before you can create instances with GPUs.
All free tiers users are initiated with 0 GPU, which they will have to submit a request to increase the quota. However, to file a request, one has to upgrade his account to a paid account.
10 minutes ago, I am still in the free tier and all my projects will be billed for the $300 free trial promotion credits.
I had to upgrade my account to submit a request for GPUs. A minute later my request was approved. When I try to create an instance again, I am charged according to the price sheet.
Updates
I have just reached out to a Google Cloud Support member and here's the result.
After an account has been upgraded, the unconsumed promotion $300 credits will be consumed first. Once the credits have been consumed, the charges will automatically then charged to your payment method on file. Since you have upgraded your billing account, you will not be notified that your free trial credits are consumed and that charges will be taken on your credit card. However, you can actually monitor your charges on your account by simply logging in to your console and check usage in the billing section.
In short, you may upgrade your account first and train your machine learning model and monitor the charges in the meantime to avoid unintended charges.
Meanwhile, Google has just released out the Colab sometime earlier to the general public with a noble goal of dissemination of machine learning education and research.
You can use GPU as a backend for free for 12 hours at a time.
The GPU used in the backend is K80(at this moment).
The 12-hour limit is for a continuous assignment of VM. It means we can use GPU compute even after the end of 12 hours by connecting to a different VM.
This essentially means you can train your ML model for free! Hurray!
Hope my findings help.
Update as on 3/14/18:
Google Cloud ML Engine now allows you to use GPUs with your jobs in the free tier. I am currently training using the BASIC_GPU scale tier, which uses a single standard-gpu instance as master machine. I haven't yet tried using cluster of multiple GPUs though, will update when I find information on this.
Edit: If you are learning and want to experiment with your Machine/Deep learning models, you can give Google's Colab a try, which provides free GPU access for the same purpose.
You can't choose a GPU because, as a free trial your GPU quota is set to 0. Simply go to the quotas panel on your Google Cloud Console, then you will be able to edit you quota there to some value other than 0 by clicking on "Edit quotas" and selecting the kind of GPU you want to use.

How does Google bill for compute engine?

I am currently running the free trial with 300$ credit.
There's one instance present in the console. Does Google bill for 'running' the instance or 'connecting' it to SSH?
Google charges compute instances by the time they're running (started) according to CPU and RAM, there are additional charges for disks and network. There are discounts for long running instances and for commitments. pricing information is available at https://cloud.google.com/compute/pricing
You can start and stop instances any time and it depends on your workload... for your use-case of compiling things you may use preemptible instances which are much cheaper - https://cloud.google.com/preemptible-vms/

Using Google Container Engine with GCP free tier

Is it possible to use Google Container Engine with Google Cloud free tier?
(I mean the "Always Free" usage limit, not the $300 free credit)
The docs for GKE says:
The basic cluster is free but each node is charged at standard Compute
Engine pricing
But the Compute Engine also have a free instance. Is it possible to use them together?
Unfortuniately, this is no longer a correct answer, as GKE no longer (as of December 2020 if not earlier) supports f1-micro instances for node pools as they do not have sufficient memory (as alluded to in my original answer below where enabling stackdrier would make the cluster unstable). Therefore, it is not possible to run a GKE cluster fully within the free tier.
Previously, this was possible. See explanation below.
Yes, you can use GKE with the free tier. GKE only charges for the underlying compute engine resources, which are directly billed by compute engine. (Note that after June 6, 2020, the free tier only includes one free GKE zonal cluster -- not an unlimited number of clusters).
GKE will likely require you to run 3 free f1-micro instances concurrently to get the cluster to a minimum size, but as long as the cluster is in one of the free regions and the total usage in a month is under the total number of hours per month it will still be free (that is, you can run 3 f1-micros for a bit under 250 hours and still be in the free tier). Make sure to shut off your instances when you are not using them. See more at https://cloud.google.com/free/docs/gcp-free-tier#always-free-usage-limits (especially the notes about the limit being time rather than instance count).
You may also want to ensure that the persistant disks are not kept around while the cluster isn't running, as the free tier only allows 3 10GB disks over the course of the month.
If you happen to run over the usage, you will only be charged for the usage beyond the free tier.
Of course, this all assumes that f1-micro instances are suitable to your use case. They are quite limited, and once GKE is on them, they have almost nothing remaining in terms of RAM: https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#memory_cpu
Finally, it has been my experience that setting up the stackdriver support when you create the cluster if you only have micro instances can cause the cluster to struggle greatly -- the stackdriver monitoring alone (or with even minimal other applications) start to cause the nodes to be throttled and time out.
For now It's not possible to create kubernates cluster with one f1-micro. It requires minimum 3 f1-micro instances:
ERROR: (gcloud.container.clusters.create) ResponseError: code=400,
message=Clusters of f1-micro instances must contain at least 3 nodes.
Please make the cluster larger or use a different machine type
This is how I made mine. I created a cluster named 'free-cluster' which runs 2 nodes. These nodes are in 'us-west1-a' as the 'free' tier only allows for the us-east, us-west and us-central zones only. also the VM instance-type should only use 'f1-micro' as that is the freebie they give. the rest are paid.
As is pointed out, GCP does force us to create 3 nodes and no option to state this in the dashboard. But after that you can just go to the nodes and "cordon" and "drain" them so they will not consume the free compute fast. You can leave just one node for the free-tier... this however makes less sense as you will not take advantage of load balancing, self-healing and other features as to why we use kubernetes clusters to begin with. for me I am good testing on 2 nodes as I only need to pay for that 1 cheap monthly f1-micro for my hobby and learning. make sure to go to Google Compute Engine in the dashboard and open the 'Instance groups' in the sidebar, you will find the VM instances in that cluster which you can just delete by selecting and clicking the "Delete Instance" button.
There is no way to get a free GKE cluster on GCP, but you can get a very cheap one by following the instructions at https://github.com/Neutrollized/free-tier-gke.
Using a combination of GKE's free management tier and a low cost machine type, the cost estimate is less than $5 per month: .
More details on what is available as part of the free tier can be found here: https://cloud.google.com/free.
tl;dr
gcloud container clusters create cheap-cluster \
--zone us-west1-a \
--node-locations us-west1-a \
--machine-type=e2-small \
--max-nodes=1 \
--num-nodes=1
As I understand, Google allows 1 f1-micro instance to be used for free even after the 12 month free period.