Professional Documents
Culture Documents
Trainer: http://abraarsyed.me/
https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/
Don't Panic: Kubernetes and Docker
Authors: Jorge Castro, Duffie Cooley, Kat Cosgrove, Justin Garrison, Noah Kantrowitz, Bob Killen, Rey
Lejano, Dan “POP” Papandrea, Jeffrey Sica, Davanum “Dims” Srinivas Kubernetes is deprecating Do...
kubernetes.io
004701550412
HKBK786925
648944
2006 docker ps
2007 docker ps -l
2008 docker ps -a
2010 docker ps -a
2011 docker rm awesome_allen
2012 docker ps -a
2014 docker ps -a
2018 docker ps -a
1998 docker ps -a
2008 history
=================================
https://www.yammer.com/abb.com/#/files/311563321344
---------------------
------------------------------------------
---------------------------------------
2028 docker run -it ubuntu:18.04 bash -c "sleep 3; echo all done"
----------------------------------------------------
------------------------
--cpu-rt-runtime=950000 \
--ulimit rtprio=99 \
--cap-add=sys_nice \
debian:jessie
------------------------------------------------------
docker images
1971 ls
1972 cd /
1973 ls
1974 cd home
1975 ls
1976 docker ps
1978 docker ps -a
1988 history
1996 history
1997 exit
==========================================
docker history dbf995fc07ff
=====================================
2095 ls
2096 pwd
2097 cd example/
2098 pwd
2099 cd ..
2100 ls
2109 ls
2110 cd example/
2111 ls
2114 ls -la
2116 cd ..
2117 ls
2118 docker run -it -v /shared-folder ubuntu:18.04 bash
2119 ls
2120 rm -r example
2121 ls
2123*
2128 ls
2129 cd example-1/
2130 ls
2131 cd ../example-2/
2132 ls
2133 cd ..
2136 ls
==============================================
2003 cd example/
2004 ls
2005 ls -ls
2006 ls
2008 docker ps -a
============================================
1996 history
1997 exit
1998 history
-=============================================
nc -lp 1234
nc 127.0.0.1 1234
//as listerner
------------------------------------
nc -lp 1234 | tee | nc -lp 5678 this can show msg from both client
------------------------------------------
2140 nc
2144 docker run -it -p 1234:1234 -p 5678:5678 --name my-container ubuntu:18.04 bash
2148 docker run -it -p 1234 -p 5678 --name my-container ubuntu:18.04 bash
2149 clear
2153 docker run -it -p 1234:1234 -p 5678:5678 --name my-server ubuntu:18.04 bash
2027 clear
=================================================
2004 clear
================================
-----------------------------------------
2161 docker run --rm -it --net learning --name catserver ubuntu:18.04 bash
--------------------------------------
2029 history
2030 docker run --rm -it --net learning --name dogserver ubuntu:18.04 bash
=-----------------------------------
2006 history
2007 ifconfig
-----------------------------------------------
https://hub.docker.com/_/microsoft-dotnet-samples/
--------------------------------------------------------------
4. Other machines can pull this image and create the docker containers
------------------------------------------------------------------
FROM ubuntu:18.04
FROM ubuntu:18.04
------------------------------------------------
FROM alpine
----------------------------------------------------
https://docs.docker.com/engine/reference/builder/#arg
----------------------------------------------
"proxies":
"default":
"httpProxy": "http://127.0.0.1:8009",
"httpsProxy": "http://127.0.0.1:8009",
"noProxy": "127.0.0.1"
Configure Docker to use a proxy serverHow to configure the Docker client to use a proxy
serverdocs.docker.com
-----------------------------------------------------
[Service]
Environment="HTTP_PROXY=http://127.0.0.1:8009/" "HTTPS_PROXY=http://127.0.0.1:8009/"
"NO_PROXY=localhost,127.0.0.1"
Containers must use “host” based networking to leverage iboss proxy available on host system (--
network="host" flag in docker run).
https://docs.docker.com/config/daemon/systemd/
----------------------------------------------------------
************************************************************************
DAY -2 (5/12/2020)
-----------------------
C:\Windows\System32\drivers\etc\hosts
https://docs.docker.com/engine/examples/dotnetcore/
https://docs.docker.com/compose/aspnet-mssql-compose/
Dockerize an ASP.NET Core applicationCreate a Docker image by layering your ASP.NET Core app on
debian for Linux Containers or with Windows Nano Server containers using a
Dockerfile.docs.docker.com
==============================================================
8**********************************************************************]]]
Docker
Kubectl
Minikube
==============================================
https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo
docker ps
On Ubuntu, the binary is called docker.io. It also does not work without sudo:
sudo docker....askubuntu.com
==================================================
Hey guys, please give me a quick hand raise once you are back (smile)
====================================================
For those, who are back already, please complete the installation for kubectl and minikube
https://minikube.sigs.k8s.io/docs/start/
=================================================
2084 k9s
2086 kubectx
2087 cd ~
2088 cd .kube/
2089 ls
===================================
X Exiting due to SVC_NOT_FOUND: Service 'hw' was not found in 'default' namespace.
You may select another namespace by using 'minikube service hw -n <namespace>'. Or list out all the
services using 'minikube service list'
--------------------------------------
https://www.rorymon.com/blog/how-to-rdp-to-
ubuntu/#:~:text=Launch%20the%20RDP%20client%20on,able%20to%20work%20with%20it.
2. Checking on Browser
-------------------------------------
Task:
----------------------------------
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mypod-deployment
spec:
selector:
matchLabels:
app: demo
env: test
replicas: 3
template:
metadata:
labels:
app: demo
env: test
spec:
containers:
- name: nginx
image: nginx
ports:
- name: http
containerPort: 80
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: mypod-service
spec:
type: NodePort
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: demo
---
=================================
----------------------------------
APPENDIX
docker-compose.zip
Docker Compose zip file.
Dockerfile
DOCKER FILE
HOST file.
Host
File_MicrosoftTeams-image.png
Kuberneters pods
command -MicrosoftTeams-image.png
Yaml files
mypod.yml
mypodservice.yml
deploymentForAll.ym
l
simple-all-using-repli
cationcontroller.yaml
training-hands-on.zip