title: Kubernetes Single Container Node Architecture
body: <p>I am semi new to kubernetes and as i understand many things cherry picked around the topic, some things are still hard to put together.</p>
  
  <p>I have a following project setup and need an architectural advice on whats a best way to setup my k8 cluster.</p>
  
  <p>I have two applications for now: API-APP and WORKER-APP, they both have heavy resource consumption so i need one node to be reserved for one application (pod). </p>
  
  <p>I create total of 6 nodes so that 3 API-APP (replicated using replicationcontroller) and 3 WORKER-APP (replicated using replication controller) can all have its own node (they use about 90% CPU/Memory).</p>
  
  <p>Currently k8 just deploys them out to whichever node and sometimes i have a case that all 3 of my API-APP live on 1 node i have 2 nodes just doing nothing.</p>
  
  <p>Is there any way to specify that i want 1 node to be reserved for 1 app ?</p>
  
  <p>I have looked at specifying requests/limit but either simply nothing happens or im doing something wrong. </p>
  
  <p>yaml file:</p>
  
  <pre><code># RC for svc1
  kind: ReplicationController
  apiVersion: v1
  metadata:
    name: APP-API
  spec:
    replicas: 3
    selector:
    template:
      metadata:
        labels:
          app: APP-API
      spec:
        containers:
        - name: APP-API
          image: SOME-IMAGE
          resources:
            limits:
              cpu: "7000m"
          requests:
            cpu: "7000m"
          env:
          - name: APP_SVC
            value: APP-API
          ports:
          - containerPort: 80
            protocol: TCP
  ---
  # Service for svc1
  kind: Service
  apiVersion: v1
  metadata:
    labels:
      app: APP-API
    name: APP-API
  spec:
    type: ClusterIP
    ports:
    - port: 80
      name: http
    selector:
      app: APP-API
  </code></pre>
  
  <p>my machines have all 8 cores so in this case i am trying to tell it to request 7 cores but nothing happens. </p>
  
  <p><a href="https://i.stack.imgur.com/yq7VD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yq7VD.png" alt="enter image description here"></a></p>