<p>I’m voluntarily operating (developing and hosting) a community project. Meaning time and money are tight. Currently it runs on a bare-metal machine at AWS (t2.micro, (1 vCPU, 1 GB memory)).
For learning purposes I would like to containerize my application. Now I'm looking for hosting. The Google Cloud Plattform seems to be the cheapest to me.
I setup a Kubernetes cluster with 1 node (1.10.9-gke.5, g1-small (1 vCPU shared, 1.7 GB memory)).</p>

<p>After I set up the one node Kubernetes cluster I checked how much memory and CPU is already used by the Kubernetes system. (Please see kubectl describe node).</p>

<p>I was wondering if I can run the following application with 30% CPU and 30% memory left on the node. Unfortunately I don't have experience with how much the container in my example will need in terms of resources. But having only 30% CPU and 30% memory left doesn't seem like much for my kind of application.</p>

<p><strong>kubectl describe node</strong></p>

<pre><code>Non-terminated Pods:         (9 in total)
  Namespace                  Name                                                           CPU Requests  CPU Limits  Memory Requests  Memory Limits
  ---------                  ----                                                           ------------  ----------  ---------------  -------------
  kube-system                event-exporter-v0.2.3-54f94754f4-bznpk                         0 (0%)        0 (0%)      0 (0%)           0 (0%)
  kube-system                fluentd-gcp-scaler-6d7bbc67c5-pbrq4                            0 (0%)        0 (0%)      0 (0%)           0 (0%)
  kube-system                fluentd-gcp-v3.1.0-fjbz6                                       100m (10%)    0 (0%)      200Mi (17%)      300Mi (25%)
  kube-system                heapster-v1.5.3-66b7745959-4zbcl                               138m (14%)    138m (14%)  301456Ki (25%)   301456Ki (25%)
  kube-system                kube-dns-788979dc8f-krrtt                                      260m (27%)    0 (0%)      110Mi (9%)       170Mi (14%)
  kube-system                kube-dns-autoscaler-79b4b844b9-vl4mw                           20m (2%)      0 (0%)      10Mi (0%)        0 (0%)
  kube-system                kube-proxy-gke-spokesman-cluster-default-pool-d70d068f-wjtk    100m (10%)    0 (0%)      0 (0%)           0 (0%)
  kube-system                l7-default-backend-5d5b9874d5-cgczj                            10m (1%)      10m (1%)    20Mi (1%)        20Mi (1%)
  kube-system                metrics-server-v0.2.1-7486f5bd67-ctbr2                         53m (5%)      148m (15%)  154Mi (13%)      404Mi (34%)
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  CPU Requests  CPU Limits  Memory Requests  Memory Limits
  ------------  ----------  ---------------  -------------
  681m (72%)    296m (31%)  807312Ki (67%)   1216912Ki (102%)
</code></pre>

<p><strong>Here my app</strong></p>

<pre><code>PROD:
API:        ASP.NET core 1.1 (microsoft/dotnet:1.1-runtime-stretch)
Frontend:   Angular app (nginx:1.15-alpine)
Admin:      Angular app (nginx:1.15-alpine)

TEST:
API:        ASP.NET core 1.1 (microsoft/dotnet:1.1-runtime-stretch)
Frontend:   Angular app (nginx:1.15-alpine)
Admin:      Angular app (nginx:1.15-alpine)

SHARDED
Database:   Postgres (postgres:11-alpine)
</code></pre>

<p>Any suggestions are more than welcome. </p>

<p>Thanks in advance!</p>

<p>If you intend to run a containerized app on a single node, a <a href="https://cloud.google.com/compute/docs/containers/" rel="nofollow noreferrer">GCE instance</a> could be better to begin with.</p>

<p>When moving into GKE, check out this <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#memory_cpu" rel="nofollow noreferrer">GCP's guide</a> explaining resource allocation per machine type before any workload and kube-system pods. You'd still need to have estimated resources usage per app component or container, maybe from monitoring your Dev or GCE environment.</p>

<p>If you want to explore other alternatives on GCP for your app (e.g. App Engine supports <a href="https://cloud.google.com/appengine/docs/flexible/dotnet/customizing-the-dotnet-runtime" rel="nofollow noreferrer">.NET</a>), here's a <a href="https://cloud.google.com/blog/products/gcp/choosing-the-right-compute-option-in-gcp-a-decision-tree" rel="nofollow noreferrer">post</a> with a decision tree that might help you. I also found this <a href="https://medium.com/google-cloud/app-engine-flex-container-engine-946fbc2fe00a" rel="nofollow noreferrer">article/tutorial</a> about running containers on App Engine and GKE, comparing both with load tests.</p>
