Docker: Difference between revisions

From Dev Wiki
Jump to navigation Jump to search
(Add initial kubernetes section)
(Update page formatting)
Line 18: Line 18:
Kubernetes is a an architecture that runs and manages docker-like containers for applications.
Kubernetes is a an architecture that runs and manages docker-like containers for applications.


{{ note | This is a simplified overview of useful commands for using Kubernetes. For full official docs, see https://kubernetes.io/docs/concepts/overview/}}
=== Kubernetes Sub Parts ===


Consists of:
* '''Control Plane''' - Where decisions are made.
* '''Control Plane''' - Where decisions are made.
** Generally has 3 of these running, to ensure availability.
** Generally has 3 of these running, to ensure availability.
Line 36: Line 39:
*** '''Controller Manager''' - Manages the controllers.
*** '''Controller Manager''' - Manages the controllers.
*** '''Key-Value Store''' - Effectively a "database of possible states".
*** '''Key-Value Store''' - Effectively a "database of possible states".
=== Kubernetes Commands ===
{{ todo | Figure out common/useful commands and add here. }}

Revision as of 01:17, 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.

Note: This is a simplified overview of useful commands for using Kubernetes. For full official docs, see https://kubernetes.io/docs/concepts/overview/


Kubernetes Sub Parts

  • 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".

Kubernetes Commands

ToDo: Figure out common/useful commands and add here.