From 4a9a5451b9e72a0aca7a437da0b1e7e41180cc37 Mon Sep 17 00:00:00 2001 From: Danielion1 Date: Thu, 29 Dec 2022 23:53:22 -0500 Subject: [PATCH 1/5] Update DockerNotes-16-17thNOv --- DockerNotes-16-17thNOv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DockerNotes-16-17thNOv b/DockerNotes-16-17thNOv index 6e6d0ce..80c2286 100644 --- a/DockerNotes-16-17thNOv +++ b/DockerNotes-16-17thNOv @@ -282,6 +282,8 @@ on the container directory # docker run -d --name web -v /root/ecomm/:/usr/local/apache2/htdocs/ httpd +docker run --name myecomm -d -P -v /root/ecomm:/usr/local/apache2/htdocs/ httpd + Step 3: we should also be able to access the contaienr from brower, so what option will you give in the command From 7007116c0f4a3b62d345bd79c661832a4ecc5259 Mon Sep 17 00:00:00 2001 From: Danielion1 Date: Fri, 30 Dec 2022 19:45:23 -0500 Subject: [PATCH 2/5] Update Notes --- DockerNotes/Notes | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DockerNotes/Notes b/DockerNotes/Notes index b243af4..2d73af7 100644 --- a/DockerNotes/Notes +++ b/DockerNotes/Notes @@ -257,6 +257,19 @@ once container is created you cannot do volume mapping DOCKER FILE ***************************************** + +FROM ubuntu +RUN apt-get update +RUN apt-get install git -y +COPY copy.txt /tmp +ADD compress.tar.gz /tmp +[ec2-user@DOCKERHOST mydockerfiles]$ vim copy.txt +[ec2-user@DOCKERHOST mydockerfiles]$ [ec2-user@DOCKERHOST mydockerfiles]$ touch compress.txt +[ec2-user@DOCKERHOST mydockerfiles]$ ls +compress.txt copy.txt Dockerfile +[ec2-user@DOCKERHOST mydockerfiles]$ tar -czvf compress.tar.gz compress.txt + + Creating our own Images: 2 ways: From 768b3002363485948725f732cb2cf8ae4811cb69 Mon Sep 17 00:00:00 2001 From: Danielion1 Date: Sun, 1 Jan 2023 00:52:41 -0500 Subject: [PATCH 3/5] Update Notes --- Kubernetes/Notes | 1 + 1 file changed, 1 insertion(+) diff --git a/Kubernetes/Notes b/Kubernetes/Notes index 57890f7..01bb712 100644 --- a/Kubernetes/Notes +++ b/Kubernetes/Notes @@ -34,6 +34,7 @@ spec: kubectl logs pod1 kubectl logs -f pod1 kubectl logs -f pod1 -c c1 + kubectl delete pods -l env=QA From 0cb8a74fd6642671b1478208d37f9d58e41a267a Mon Sep 17 00:00:00 2001 From: Danielion1 Date: Mon, 2 Jan 2023 21:09:31 -0500 Subject: [PATCH 4/5] Update Notes --- Kubernetes/Notes | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Kubernetes/Notes b/Kubernetes/Notes index 01bb712..9420512 100644 --- a/Kubernetes/Notes +++ b/Kubernetes/Notes @@ -29,6 +29,39 @@ spec: kubectl get pods -l app=frontend For pod and container logs: + + -------------------------------------------------------------- + vim replicasetdemo.yaml +--- + apiVersion: apps/v1 + kind: Replicaset + metadata: + name: daniel + spec: + replicas:3 + selector: + matchlabels: + type:webserver + template: + metadata: + name:mypod + labels: + author:dan + type:webserver + spec: + containers: + name: c1 + image: nginx + ... + + kubectl create -f replicasetdemo.yaml + kubectl get all + kubectl get pod -l type=webserver + kubectl scale replicaset nameofreplicaset --replicas=5 + + + ---------------------------------------------------------------------- + kubectl describe pod pod1 | less kubectl logs pod1 From 7555cec6879f3929b66d612886e0d18c7f29cd1b Mon Sep 17 00:00:00 2001 From: Danielion1 Date: Mon, 2 Jan 2023 21:47:10 -0500 Subject: [PATCH 5/5] Update Notes --- Kubernetes/Notes | 1 + 1 file changed, 1 insertion(+) diff --git a/Kubernetes/Notes b/Kubernetes/Notes index 9420512..bc46dd0 100644 --- a/Kubernetes/Notes +++ b/Kubernetes/Notes @@ -68,6 +68,7 @@ spec: kubectl logs -f pod1 kubectl logs -f pod1 -c c1 kubectl delete pods -l env=QA + kubectl describe service serviceName