Docker

From Dev Wiki
Revision as of 00:55, 6 July 2023 by Brodriguez (talk | contribs) (Add initial kubernetes section)
Jump to navigation Jump to search
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".