Compare commits

...

25 Commits

Author SHA1 Message Date
Jerome Petazzoni
df58206de5 fix-redirects.sh: adding forced redirect 2020-04-07 16:57:15 -05:00
Jerome Petazzoni
f144e40852 Merge branch 'master' into septembre2018 2018-09-21 09:09:12 +02:00
Jerome Petazzoni
93ad2abe94 5G -> 2G 2018-09-20 02:07:44 -05:00
Jerome Petazzoni
2f832b4978 Merge branch 'master' into septembre2018 2018-09-19 14:02:29 -05:00
Jerome Petazzoni
1995be3bec Update Gitter link for 2nd session 2018-09-19 14:00:08 -05:00
Jerome Petazzoni
529b74c041 css 2018-09-17 03:42:54 -05:00
Jerome Petazzoni
280bd2d52c enix 2018-09-17 01:21:17 -05:00
Jerome Petazzoni
e4be1179f4 gitter 2018-09-17 01:20:10 -05:00
Jerome Petazzoni
dca705a76f wifi 2018-09-17 01:16:15 -05:00
Jerome Petazzoni
05eb798dd9 Merge branch 'master' into septembre2018 2018-09-16 15:35:32 -05:00
Jerome Petazzoni
fbfb5e6b73 Enix Customization 2018-09-16 15:15:52 -05:00
Jerome Petazzoni
1fef53bcc2 Merge branch 'master' into septembre2018 2018-09-16 10:58:21 -05:00
Jerome Petazzoni
77fda648ce Add gitter link 2018-09-16 10:49:24 -05:00
Jerome Petazzoni
f4a6935088 Merge branch 'master' into septembre2018 2018-09-16 09:10:32 -05:00
Jerome Petazzoni
06c695db6e Merge branch 'master' into septembre2018 2018-09-15 11:11:20 -05:00
Jerome Petazzoni
d1f8248cfb Merge branch 'replace-es-with-httpenv' into septembre2018 2018-09-12 15:50:32 -05:00
Jerome Petazzoni
db8e8377ac Replace ElasticSearch with jpetazzo/httpenv
ElasticSearch slowly uses up to 2GB of RAM.
Eventually, on instances provisioned with
only 4GB of RAM and without swap, if more
than one ElasticSearch pod end up on the
same instance, it will cause the instance
to slow down and ultimately crash. Instead,
we now use a tiny Go web server that shows
its environment in JSON. It still highlights
that multiple backends are serving requests
but without the memory usage issue.
2018-09-12 15:49:27 -05:00
Jerome Petazzoni
08934cedd9 Merge branch 'master' into septembre2018 2018-09-12 00:16:09 -05:00
Jerome Petazzoni
77f7cc6b4f Fix logistics 2018-09-12 00:12:05 -05:00
Jerome Petazzoni
6e6b624077 avé l'accent 2018-09-12 00:10:48 -05:00
Jerome Petazzoni
d258f696e3 Enix Sep 2018 2018-09-12 00:06:59 -05:00
Jerome Petazzoni
34f4dfbc45 Merge branch 'update-final-words' into septembre2018 2018-09-12 00:01:47 -05:00
Jerome Petazzoni
fb94450738 Merge branch 'enixlogo' into septembre2018 2018-09-12 00:01:44 -05:00
Jerome Petazzoni
51882896d4 Update last chapter (what's next) 2018-09-10 03:29:21 -05:00
Jerome Petazzoni
3eaa844c55 Add ENIX logo
Warning: do not merge this branch to your content, otherwise you
will get the ENIX logo in the top right of all your decks
2018-09-08 07:49:38 -05:00
9 changed files with 157 additions and 55 deletions

1
slides/_redirects Normal file
View File

@@ -0,0 +1 @@
/ /kube-fullday.yml.html 200!

22
slides/images/enix-io.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -59,9 +59,9 @@ Under the hood: `kube-proxy` is using a userland proxy and a bunch of `iptables`
.exercise[
- Start a bunch of ElasticSearch containers:
- Start a bunch of HTTP servers:
```bash
kubectl run elastic --image=elasticsearch:2 --replicas=7
kubectl run httpenv --image=jpetazzo/httpenv --replicas=10
```
- Watch them being started:
@@ -70,15 +70,17 @@ Under the hood: `kube-proxy` is using a userland proxy and a bunch of `iptables`
```
<!--
```wait elastic-```
```wait httpenv-```
```keys ^C```
-->
]
The `-w` option "watches" events happening on the specified resources.
The `jpetazzo/httpenv` image runs an HTTP server on port 8888.
<br/>
It serves its environment variables in JSON format.
Note: please DO NOT call the service `search`. It would collide with the TLD.
The `-w` option "watches" events happening on the specified resources.
---
@@ -88,9 +90,9 @@ Note: please DO NOT call the service `search`. It would collide with the TLD.
.exercise[
- Expose the ElasticSearch HTTP API port:
- Expose the HTTP port of our server:
```bash
kubectl expose deploy/elastic --port 9200
kubectl expose deploy/httpenv --port 8888
```
- Look up which IP address was allocated:
@@ -122,36 +124,34 @@ Note: please DO NOT call the service `search`. It would collide with the TLD.
## Testing our service
- We will now send a few HTTP requests to our ElasticSearch pods
- We will now send a few HTTP requests to our pods
.exercise[
- Let's obtain the IP address that was allocated for our service, *programmatically:*
```bash
IP=$(kubectl get svc elastic -o go-template --template '{{ .spec.clusterIP }}')
IP=$(kubectl get svc httpenv -o go-template --template '{{ .spec.clusterIP }}')
```
<!--
```hide kubectl wait deploy elastic --for condition=available```
```hide sleep 5``` (give some time for elasticsearch to start... hopefully this is enough!)
```hide kubectl wait deploy httpenv --for condition=available```
-->
- Send a few requests:
```bash
curl http://$IP:9200/
curl http://$IP:8888/
```
- Too much output? Filter it with `jq`:
```bash
curl -s http://$IP:8888/ | jq .HOSTNAME
```
]
--
We may see `curl: (7) Failed to connect to _IP_ port 9200: Connection refused`.
This is normal while the service starts up.
--
Once it's running, our requests are load balanced across multiple pods.
Our requests are load balanced across multiple pods.
---
@@ -205,9 +205,9 @@ class: extra-details
.exercise[
- Check the endpoints that Kubernetes has associated with our `elastic` service:
- Check the endpoints that Kubernetes has associated with our `httpenv` service:
```bash
kubectl describe service elastic
kubectl describe service httpenv
```
]
@@ -229,15 +229,15 @@ class: extra-details
- If we want to see the full list, we can use one of the following commands:
```bash
kubectl describe endpoints elastic
kubectl get endpoints elastic -o yaml
kubectl describe endpoints httpenv
kubectl get endpoints httpenv -o yaml
```
- These commands will show us a list of IP addresses
- These IP addresses should match the addresses of the corresponding pods:
```bash
kubectl get pods -l run=elastic -o wide
kubectl get pods -l run=httpenv -o wide
```
---

View File

@@ -20,6 +20,43 @@ And *then* it is time to look at orchestration!
---
## Options for our first production cluster
- Get a managed cluster from a major cloud provider (AKS, EKS, GKE...)
(price: $, difficulty: medium)
- Hire someone to deploy it for us
(price: $$, difficulty: easy)
- Do it ourselves
(price: $-$$$, dificulty: hard)
---
## One big cluster vs. multiple small ones
- Yes, it is possible to have prod+dev in a single cluster
(and implement good isolation and security with RBAC, network policies...)
- But it is not a good idea to do that for our first deployment
- Start with a production cluster + at least a test cluster
- Implement and check RBAC and isolation on the test cluster
(e.g. deploy multiple test versions side-by-side)
- Make sure that all our devs have usable dev clusters
(wether it's a local minikube or a full-blown multi-node cluster)
---
## Namespaces
- Namespaces let you run multiple identical stacks side by side
@@ -62,15 +99,19 @@ And *then* it is time to look at orchestration!
## Stateful services (second take)
- If you really want to host stateful services on Kubernetes, you can look into:
- If we want to host stateful services on Kubernetes, we can use:
- volumes (to carry persistent data)
- a storage provider
- storage plugins
- persistent volumes, persistent volume claims
- persistent volume claims (to ask for specific volume characteristics)
- stateful sets
- stateful sets (pods that are *not* ephemeral)
- Good questions to ask:
- what's the *operational cost* of running this service ourselves?
- what do we gain by deploying this stateful service on Kubernetes?
---
@@ -123,8 +164,6 @@ And *then* it is time to look at orchestration!
(but is being [deprecated](https://github.com/kubernetes/heapster/blob/master/docs/deprecation.md) starting with Kubernetes 1.11)
---
## Managing the configuration of our applications

View File

@@ -1,14 +1,14 @@
title: |
Deploying and Scaling Microservices
with Kubernetes
D&eacute;ployer ses applications
avec Kubernetes
#chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)"
#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)"
chat: "In person!"
chat: "[Gitter](https://gitter.im/enix/formation-kubernetes-20180920)"
#chat: "FIXME"
gitrepo: github.com/jpetazzo/container.training
slides: http://container.training/
slides: http://septembre2018.container.training/
exclude:
- self-paced

View File

@@ -1,26 +1,45 @@
## Intros
- This slide should be customized by the tutorial instructor(s).
- Hello! We are:
- .emoji[👩🏻‍🏫] Ann O'Nymous ([@...](https://twitter.com/...), Megacorp Inc)
- .emoji[👨🏾‍🎓] Stu Dent ([@...](https://twitter.com/...), University of Wakanda)
<!-- .dummy[
- .emoji[👷🏻‍♀️] AJ ([@s0ulshake](https://twitter.com/s0ulshake), Travis CI)
- .emoji[🐳] Jérôme ([@jpetazzo](https://twitter.com/jpetazzo), Enix SAS)
- .emoji[] Jérémy ([@jeremygarrouste](twitter.com/jeremygarrouste), Inpiwee)
- .emoji[🚁] Alexandre ([@alexbuisine](https://twitter.com/alexbuisine), Enix SAS)
] -->
- Who are you?
- The workshop will run from ...
- devs?
- There will be a lunch break at ...
- ops?
- architects?
- other?
---
## Who's Enix?
- Virtualization
- Hosting
- Networking
- Container Orchestration
- Consulting
- Training
---
## Logistics
- The workshop will run until 17:30
- There will be a lunch break at 12:15
(And coffee breaks!)

17
slides/override.css Normal file
View File

@@ -0,0 +1,17 @@
.remark-slide-content:not(.pic) {
background-repeat: no-repeat;
background-position: 99% 1%;
background-size: 8%;
background-image: url(https://enix.io/static/img/logos/logo-domain-cropped.png);
}
div.extra-details:not(.pic) {
background-image: url("images/extra-details.png"), url(https://enix.io/static/img/logos/logo-domain-cropped.png);
background-position: 0.5% 1%, 99% 1%;
background-size: 4%, 8%;
}
.remark-slide-content:not(.pic) div.remark-slide-number {
top: 16px;
right: 112px
}

View File

@@ -6,16 +6,19 @@ class: title, self-paced
---
class: title, pic
![ENIX logo](images/enix-io.svg)
---
class: title, in-person
@@TITLE@@<br/></br>
.footnote[
**Be kind to the WiFi!**<br/>
<!-- *Use the 5G network.* -->
*Don't use your hotspot.*<br/>
*Don't stream videos or download big files during the workshop.*<br/>
*Thank you!*
**WiFi: EnixTraining**<br/>
**Password: kubeforever**
**Slides: @@SLIDES@@**
]

View File

@@ -4,6 +4,7 @@
<title>@@TITLE@@</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" href="workshop.css">
<link rel="stylesheet" href="override.css">
</head>
<body>
<!--