Docker: Difference between revisions

From Dev Wiki
Jump to navigation Jump to search
(Create page)
 
(Add initial kubernetes section)
Line 1: Line 1:


{{ todo | Page is very incomplete. Notes of learning docker here. }}
{{ todo | Page is very incomplete. Notes of learning docker/kubernetes here. }}


== Docker ==


The {{ ic |docker-compose.yml}} file defines the docker service to run.
The {{ ic |docker-compose.yml}} file defines the docker service to run.
Line 10: Line 12:


Finally, start the service with {{ ic |docker-compose up -build -d}}.
Finally, start the service with {{ ic |docker-compose up -build -d}}.
== Kubernetes ==
Kubernetes is a an architecture that runs and manages docker-like containers for applications.
Consists of:
* '''Control Plane''' - Where decisions are made.
** Generally has 3 of these running, to ensure availability.
* '''Worker Node''' - A location where something might be running.
** Can have any number of these, as needed.
** Parts:
*** '''Kubletes''' - Manages one or more PODS, each POD being a group of docker-style containers.
*** '''Kube Proxy''' - Ensures communication is fluid between all parts.
*** '''Controller''' - Helps control all other aspects, to ensure it does what it's meant to.
* '''External Resources''' - Various outside resources that the '''Control Plane''' and '''Worker Nodes''' do work with.
** Ex: Storage, load balancers, etc.
* '''API''' - An interface for humans to interact with the '''Control Planes'''.
** Most interactions with the '''API''' involve telling Kubernetes "this is the state I want everything to be in". Kubernetes then figures out how to make that happen.
** Parts:
*** '''Scheduler''' - Determines what should happen, when, and where.
*** '''Controller Manager''' - Manages the controllers.
*** '''Key-Value Store''' - Effectively a "database of possible states".

Revision as of 00:55, 6 July 2023

ToDo: Page is very incomplete. Notes of learning docker/kubernetes here.


Docker

The docker-compose.yml file defines the docker service to run.

The Dockerfile file defines the actual commands the docker instance should execute once it is created, in order to get our service.

These two files should be put into the same directory. Then cd into the directory and build it with docker-compose run.

Finally, start the service with docker-compose up -build -d.


Kubernetes

Kubernetes is a an architecture that runs and manages docker-like containers for applications.


Consists of:

  • Control Plane - Where decisions are made.
    • Generally has 3 of these running, to ensure availability.
  • Worker Node - A location where something might be running.
    • Can have any number of these, as needed.
    • Parts:
      • Kubletes - Manages one or more PODS, each POD being a group of docker-style containers.
      • Kube Proxy - Ensures communication is fluid between all parts.
      • Controller - Helps control all other aspects, to ensure it does what it's meant to.
  • External Resources - Various outside resources that the Control Plane and Worker Nodes do work with.
    • Ex: Storage, load balancers, etc.
  • API - An interface for humans to interact with the Control Planes.
    • Most interactions with the API involve telling Kubernetes "this is the state I want everything to be in". Kubernetes then figures out how to make that happen.
    • Parts:
      • Scheduler - Determines what should happen, when, and where.
      • Controller Manager - Manages the controllers.
      • Key-Value Store - Effectively a "database of possible states".