Skip to content

Commit ca2b502

Browse files
committed
Adding documentation
1 parent d8e3224 commit ca2b502

File tree

1 file changed

+75
-4
lines changed

1 file changed

+75
-4
lines changed

README.md

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,92 @@
11
# k8s-workshop
22
Workshop repository to play with Docker and Kubernetes
33

4+
### Links
5+
6+
- https://www.katacoda.com/courses/docker/deploying-first-container
7+
- https://github.com/
8+
- https://hub.docker.com/
9+
- https://www.katacoda.com/courses/kubernetes/launch-single-node-cluster
10+
11+
### Docker
412

513
```sh
6-
docker run -dit --name web -p 8080:80 -v /home/ccruz/website/:/usr/local/apache2/htdocs/ httpd:2.4-alpine
14+
docker run -dit --name web -p 8080:80 -v /home/user/website/:/usr/local/apache2/htdocs/ httpd:2.4-alpine
15+
```
716

17+
### GitHub
818

19+
Resources
20+
- Dockerfile
21+
- index.html
22+
23+
24+
```sh
925
docker build -t web:1.0 .
26+
```
1027

11-
docker run -dit --name web -p 8080:80 web:1.0
28+
```sh
29+
docker run -dit --name web -p 8080:80 twogghub/k8s-workshop:1.0
30+
```
1231

32+
```sh
33+
localhost:8080
34+
```
1335

36+
### Kubernetes
37+
38+
```sh
1439
docker pull twogghub/k8s-workshop
40+
```
41+
```sh
42+
kubectl run web --image=twogghub/k8s-workshop:1.0
43+
```
44+
45+
```sh
46+
kubectl expose deployment web --port=80 --external-ip=$(minikube ip) --type=LoadBalancer
47+
```
1548

16-
kubectl run webk8s --image=twogghub/k8s-workshop:1.0
49+
```sh
50+
vim deployment.yaml
51+
```
1752

18-
kubectl expose deployment webk8s --port=8080 --external-ip=$(minikube ip) --type=LoadBalancer
53+
```sh
54+
{
55+
"apiVersion": "extensions/v1beta1",
56+
"kind": "Deployment",
57+
"metadata": {
58+
"name": "webyml"
59+
},
60+
"spec": {
61+
"replicas": 2,
62+
"template": {
63+
"metadata": {
64+
"labels": {
65+
"app": "webyml"
66+
}
67+
},
68+
"spec": {
69+
"containers": [
70+
{
71+
"name": "webyml",
72+
"image": "twogghub/k8s-workshop:1.0",
73+
"ports": [
74+
{
75+
"containerPort": 80
76+
}
77+
]
78+
}
79+
]
80+
}
81+
}
82+
}
83+
}
84+
```
1985

86+
```sh
87+
kubectl create -f deployment.yaml
2088
```
2189

90+
```sh
91+
kubectl expose deployment webyml --port=80 --external-ip=$(minikube ip) --type=LoadBalancer
92+
```

0 commit comments

Comments
 (0)