Skip to content

ReadingNotes

deepaksama edited this page Sep 4, 2022 · 12 revisions

Reading Notes

Docker

Commands

  • Check version

    docker version

  • Images

    • Help on docker images command options

      docker images --help

    • List all images on a machine

      docker images -a

  • Containers

    • Help on docker ps command options

      docker ps --hep

    • List all running containers on a machine

      docker ps

    • List all containers on a machine irrespective of status

      docker ps -a

Kubernetes

  • Kubernetes manages resources i.e Virtual Servers
  • Different cloud providers have different names for these virtual servers
    • AWS calls them EC2
    • Azure calls them virtual machines
    • GCP calls them Compute engine and Kubernetes call them generically as Nodes

Configure GKE (Google Kubernetes Engine) gcloud config set account gcloud config set project <PROJECT_NAME> gcloud config set compute/zone

Ex:
gcloud config set account cloud_user_p_dae418f5@linuxacademygclabs.com
gcloud config set project 
gcloud config set compute/zone us-central-a

Login gcloud auth login

Creatng cluster gcloud container clusters - create <CLUSTER_NAME> --num-nodes=<NUMBER_OF_NODES_IN_CLUSTER> - get-credentials <CLUSTER_NAME>
- KubeCtl

  • kubectl create deployment --image=deepaksama26/kube-demo:0.0.1-SNAPSHOT

  • kubectl expose deployment --type=LoadBalancer --port=8080

  • kubectl get deployments/deployment

  • kubectl get sevices/service

  • kubectl get replicasets/replicaset

  • kubectl get pods/pod

  • Note: -o wide option gives more details

  • kubectl describe - gives complete details about the type

  • kubectl describe pod

  • kubectl scale deployment kube-demo --replicas=3

Mysql installation with docker

Clone this wiki locally