mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-03-01 08:50:20 +00:00
Compare commits
6 Commits
kadm-2019-
...
gotochgo20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c42f2ecac9 | ||
|
|
eea53e6c61 | ||
|
|
4c5da9ed0d | ||
|
|
27b35bf0a4 | ||
|
|
62f64063c6 | ||
|
|
6b9b83a7ae |
@@ -1,5 +1,4 @@
|
||||
# Uncomment and/or edit one of the the following lines if necessary.
|
||||
#/ /kube-halfday.yml.html 200
|
||||
#/ /kube-fullday.yml.html 200
|
||||
/ /kube-fullday.yml.html 200!
|
||||
#/ /kube-twodays.yml.html 200
|
||||
/ /kube-admin-one.yml.html 200!
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
speaker: jpetazzo
|
||||
title: Getting Started With Kubernetes and Container Orchestration
|
||||
attend: https://gotochgo.com/2019/workshops/148
|
||||
slides: https://gotochgo2019.container.training/
|
||||
|
||||
- date: 2019-04-26
|
||||
country: fr
|
||||
@@ -31,7 +30,6 @@
|
||||
title: Déployer ses applications avec Kubernetes (in French)
|
||||
lang: fr
|
||||
attend: https://enix.io/fr/services/formation/deployer-ses-applications-avec-kubernetes/
|
||||
slides: https://kube-2019-04.container.training
|
||||
|
||||
- date: [2019-04-15, 2019-04-16]
|
||||
country: fr
|
||||
@@ -41,7 +39,7 @@
|
||||
title: Bien démarrer avec les conteneurs (in French)
|
||||
lang: fr
|
||||
attend: https://enix.io/fr/services/formation/bien-demarrer-avec-les-conteneurs/
|
||||
slides: http://intro-2019-04.container.training/
|
||||
slides: http://intro-2019-04.container.training
|
||||
|
||||
- date: 2019-03-08
|
||||
country: uk
|
||||
|
||||
@@ -165,25 +165,6 @@ What does that mean?
|
||||
|
||||
---
|
||||
|
||||
## Let's experiment a bit!
|
||||
|
||||
- For the exercises in this section, connect to the first node of the `test` cluster
|
||||
|
||||
.exercise[
|
||||
|
||||
- SSH to the first node of the test cluster
|
||||
|
||||
- Check that the cluster is operational:
|
||||
```bash
|
||||
kubectl get nodes
|
||||
```
|
||||
|
||||
- All nodes should be `Ready`
|
||||
|
||||
]
|
||||
|
||||
---
|
||||
|
||||
## Create
|
||||
|
||||
- Let's create a simple object
|
||||
@@ -214,7 +195,7 @@ This is equivalent to `kubectl create namespace hello`.
|
||||
|
||||
- Read back our object:
|
||||
```bash
|
||||
kubectl get namespace hello -o yaml
|
||||
kuectl get namespace hello -o yaml
|
||||
```
|
||||
|
||||
]
|
||||
@@ -307,7 +288,7 @@ class: extra-details
|
||||
|
||||
- In the other, update our namespace:
|
||||
```bash
|
||||
kubectl label namespaces hello color=purple
|
||||
kubectl label namespaces color=purple
|
||||
```
|
||||
|
||||
]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Authentication and authorization
|
||||
# Authentication and authorization (bonus)
|
||||
|
||||
*And first, a little refresher!*
|
||||
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
.exercise[
|
||||
|
||||
- Log into node `test1`
|
||||
|
||||
- Check the version of kubectl and of the API server:
|
||||
```bash
|
||||
kubectl version
|
||||
|
||||
@@ -321,7 +321,7 @@ Note: the DaemonSet won't create any pods (yet) since there are no nodes (yet).
|
||||
- Copy `kubeconfig` to the other nodes:
|
||||
```bash
|
||||
for N in 2 3; do
|
||||
scp ~/kubeconfig kuberouter$N:
|
||||
scp ~/kubeconfig kubenet$N:
|
||||
done
|
||||
```
|
||||
|
||||
@@ -346,8 +346,8 @@ Note: the DaemonSet won't create any pods (yet) since there are no nodes (yet).
|
||||
|
||||
- Open more terminals and join the other nodes:
|
||||
```bash
|
||||
ssh kuberouter2 sudo kubelet --kubeconfig ~/kubeconfig --network-plugin=cni
|
||||
ssh kuberouter3 sudo kubelet --kubeconfig ~/kubeconfig --network-plugin=cni
|
||||
ssh kubenet2 sudo kubelet --kubeconfig ~/kubeconfig --network-plugin=cni
|
||||
ssh kubenet3 sudo kubelet --kubeconfig ~/kubeconfig --network-plugin=cni
|
||||
```
|
||||
|
||||
]
|
||||
@@ -650,8 +650,7 @@ For critical services, we might want to precisely control the update process.
|
||||
|
||||
- We can see informative messages in the output of kube-router:
|
||||
```
|
||||
time="2019-04-07T15:53:56Z" level=info msg="Peer Up"
|
||||
Key=X.X.X.X State=BGP_FSM_OPENCONFIRM Topic=Peer
|
||||
time="2019-04-07T15:53:56Z" level=info msg="Peer Up" Key=X.X.X.X State=BGP_FSM_OPENCONFIRM Topic=Peer
|
||||
```
|
||||
|
||||
- We should see the routes of the other clusters show up
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
## Our environment
|
||||
|
||||
- We will use the machine indicated as `dmuc1`
|
||||
- We will use the machine indicated as `dmuc`
|
||||
|
||||
(this stands for "Dessine Moi Un Cluster" or "Draw Me A Sheep",
|
||||
<br/>in homage to Saint-Exupery's "The Little Prince")
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
.exercise[
|
||||
|
||||
- Log into the `dmuc1` machine
|
||||
- Log into the `dmuc` machine
|
||||
|
||||
- Get root:
|
||||
```bash
|
||||
@@ -106,7 +106,7 @@
|
||||
- Try to start the API server:
|
||||
```bash
|
||||
kube-apiserver
|
||||
# It will fail with "--etcd-servers must be specified"
|
||||
# It will fail with --etcd-servers must be specified
|
||||
```
|
||||
|
||||
]
|
||||
@@ -535,7 +535,7 @@ clusters:
|
||||
|
||||
- Start kubelet with that `kubeconfig.kubelet` file:
|
||||
```bash
|
||||
kubelet --kubeconfig kubeconfig.kubelet
|
||||
kubelet --kubeconfig kubelet.kubeconfig
|
||||
```
|
||||
|
||||
]
|
||||
@@ -559,7 +559,7 @@ Success!
|
||||
|
||||
Our node should show up.
|
||||
|
||||
Its name will be its hostname (it should be `dmuc1`).
|
||||
Its name will be its hostname (it should be `dmuc`).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
- Download the `kubectl` binary from one of these links:
|
||||
|
||||
[Linux](https://storage.googleapis.com/kubernetes-release/release/v1.14.1/bin/linux/amd64/kubectl)
|
||||
[Linux](https://storage.googleapis.com/kubernetes-release/release/v1.14.0/bin/linux/amd64/kubectl)
|
||||
|
|
||||
[macOS](https://storage.googleapis.com/kubernetes-release/release/v1.14.1/bin/darwin/amd64/kubectl)
|
||||
[macOS](https://storage.googleapis.com/kubernetes-release/release/v1.14.0/bin/darwin/amd64/kubectl)
|
||||
|
|
||||
[Windows](https://storage.googleapis.com/kubernetes-release/release/v1.14.1/bin/windows/amd64/kubectl.exe)
|
||||
[Windows](https://storage.googleapis.com/kubernetes-release/release/v1.14.0/bin/windows/amd64/kubectl.exe)
|
||||
|
||||
- On Linux and macOS, make the binary executable with `chmod +x kubectl`
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Namespaces
|
||||
|
||||
- We cannot have two resources with the same name
|
||||
- We would like to deploy multiple copies of our demo app
|
||||
|
||||
(Or can we...?)
|
||||
- But we cannot have two resources with the same name ... Or can we ?
|
||||
|
||||
--
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
## Using our new namespace
|
||||
|
||||
- Let's check that we are in our new namespace, then deploy the DockerCoins chart
|
||||
- Let's check that we are in our new namespace
|
||||
|
||||
.exercise[
|
||||
|
||||
@@ -164,21 +164,36 @@
|
||||
kubectl get all
|
||||
```
|
||||
|
||||
- Deploy DockerCoins:
|
||||
```bash
|
||||
helm install dockercoins
|
||||
```
|
||||
|
||||
]
|
||||
|
||||
In the last command line, `dockercoins` is just the local path where
|
||||
we created our Helm chart before.
|
||||
---
|
||||
|
||||
## Deploying another copy of DockerCoins
|
||||
|
||||
- We will use YAML definitions from a GitHub repository:
|
||||
|
||||
https://github.com/jpetazzo/kubercoins
|
||||
|
||||
.exercise[
|
||||
|
||||
- Clone kubercoins:
|
||||
```bash
|
||||
https://github.com/jpetazzo/kubercoins
|
||||
```
|
||||
|
||||
- Deploy it:
|
||||
```bash
|
||||
kubectl apply -f kubercoins
|
||||
```
|
||||
]
|
||||
|
||||
Note how `kubectl apply` can work on a whole directory!
|
||||
|
||||
---
|
||||
|
||||
## Viewing the deployed app
|
||||
|
||||
- Let's see if our Helm chart worked correctly!
|
||||
- Let's see if this worked correctly!
|
||||
|
||||
.exercise[
|
||||
|
||||
@@ -195,45 +210,6 @@ If the graph shows up but stays at zero, check the next slide!
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If did the exercices from the chapter about labels and selectors,
|
||||
the app that you just created may not work, because the `rng` service
|
||||
selector has `enabled=yes` but the pods created by the `rng` daemon set
|
||||
do not have that label.
|
||||
|
||||
How can we troubleshoot that?
|
||||
|
||||
- Query individual services manually
|
||||
|
||||
→ the `rng` service will time out
|
||||
|
||||
- Inspect the services with `kubectl describe service`
|
||||
|
||||
→ the `rng` service will have an empty list of backends
|
||||
|
||||
---
|
||||
|
||||
## Fixing the broken service
|
||||
|
||||
The easiest option is to add the `enabled=yes` label to the relevant pods.
|
||||
|
||||
.exercise[
|
||||
|
||||
- Add the `enabled` label to the pods of the `rng` daemon set:
|
||||
```bash
|
||||
kubectl label pods -l app=rng enabled=yes
|
||||
```
|
||||
|
||||
]
|
||||
|
||||
The *best* option is to change either the service definition, or the
|
||||
daemon set definition, so that their respective selectors match correctly.
|
||||
|
||||
*This is left as an exercise for the reader!*
|
||||
|
||||
---
|
||||
|
||||
## Namespaces and isolation
|
||||
|
||||
- Namespaces *do not* provide isolation
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## Versions installed
|
||||
|
||||
- Kubernetes 1.14.1
|
||||
- Docker Engine 18.09.5
|
||||
- Kubernetes 1.14.0
|
||||
- Docker Engine 18.09.3
|
||||
- Docker Compose 1.21.1
|
||||
|
||||
<!-- ##VERSION## -->
|
||||
|
||||
@@ -3,12 +3,12 @@ title: |
|
||||
for Admins and Ops
|
||||
|
||||
#chat: "[Slack](https://dockercommunity.slack.com/messages/C7GKACWDV)"
|
||||
chat: "[Gitter](https://gitter.im/enix/formation-kubernetes-ops-20190426)"
|
||||
#chat: "In person!"
|
||||
#chat: "[Gitter](https://gitter.im/jpetazzo/workshop-yyyymmdd-city)"
|
||||
chat: "In person!"
|
||||
|
||||
gitrepo: github.com/jpetazzo/container.training
|
||||
|
||||
slides: http://kadm-2019-04.container.training/
|
||||
slides: http://container.training/
|
||||
|
||||
exclude:
|
||||
- self-paced
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
title: |
|
||||
Deploying and Scaling Microservices
|
||||
with Kubernetes
|
||||
Getting started with
|
||||
Kubernetes and
|
||||
container orchestration
|
||||
|
||||
#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/jpetazzo/workshop-20190428)"
|
||||
#chat: "In person!"
|
||||
|
||||
gitrepo: github.com/jpetazzo/container.training
|
||||
|
||||
slides: http://container.training/
|
||||
slides: http://gotochgo2019.container.training/
|
||||
|
||||
exclude:
|
||||
- self-paced
|
||||
@@ -28,8 +29,8 @@ chapters:
|
||||
- k8s/concepts-k8s.md
|
||||
- shared/declarative.md
|
||||
- k8s/declarative.md
|
||||
- - k8s/kubenet.md
|
||||
- k8s/kubectlget.md
|
||||
- k8s/kubenet.md
|
||||
- - k8s/kubectlget.md
|
||||
- k8s/setup-k8s.md
|
||||
- k8s/kubectlrun.md
|
||||
- k8s/kubectlexpose.md
|
||||
@@ -40,22 +41,22 @@ chapters:
|
||||
# - k8s/kubectlproxy.md
|
||||
# - k8s/localkubeconfig.md
|
||||
# - k8s/accessinternal.md
|
||||
- k8s/dashboard.md
|
||||
# - k8s/dashboard.md
|
||||
# - k8s/kubectlscale.md
|
||||
- k8s/scalingdockercoins.md
|
||||
- shared/hastyconclusions.md
|
||||
- k8s/daemonset.md
|
||||
- - k8s/rollout.md
|
||||
# - k8s/healthchecks.md
|
||||
- k8s/logs-cli.md
|
||||
- k8s/logs-centralized.md
|
||||
# - k8s/logs-cli.md
|
||||
# - k8s/logs-centralized.md
|
||||
#- - k8s/helm.md
|
||||
# - k8s/namespaces.md
|
||||
# - k8s/netpol.md
|
||||
# - k8s/authn-authz.md
|
||||
- k8s/namespaces.md
|
||||
- k8s/netpol.md
|
||||
- k8s/authn-authz.md
|
||||
#- - k8s/ingress.md
|
||||
# - k8s/gitworkflows.md
|
||||
- k8s/prometheus.md
|
||||
# - k8s/prometheus.md
|
||||
#- - k8s/volumes.md
|
||||
# - k8s/build-with-docker.md
|
||||
# - k8s/build-with-kaniko.md
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
- Hello! We are:
|
||||
|
||||
- .emoji[🚁] Alexandre ([@alexbuisine](https://twitter.com/alexbuisine), Enix SAS)
|
||||
- .emoji[👷🏻♀️] AJ ([@s0ulshake](https://twitter.com/s0ulshake), Travis CI)
|
||||
|
||||
- .emoji[🐳] Jérôme ([@jpetazzo](https://twitter.com/jpetazzo), Enix SAS)
|
||||
|
||||
- The workshop will run from 9:15am to 5:30pm
|
||||
- The workshop will run from 9am to 4pm
|
||||
|
||||
- There will be a lunch break at noon
|
||||
|
||||
(And coffee breaks!)
|
||||
(And coffee breaks at 10:30am and 2:30pm)
|
||||
|
||||
- Feel free to interrupt for questions at any time
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
.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
|
||||
}
|
||||
@@ -9,3 +9,22 @@ class: title, in-person
|
||||
That's all, folks! <br/> Questions?
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Final words
|
||||
|
||||
- You can find more content on http://container.training/
|
||||
|
||||
(More slides, videos, dates of upcoming workshops and tutorials...)
|
||||
|
||||
- This workshop is also available as longer training sessions:
|
||||
|
||||
- [two-day Kubernetes bootstrap](https://tinyshellscript.com/kubernetes-bootstrap.html)
|
||||
|
||||
- [four-day Kubernetes administrator training](https://tinyshellscript.com/kubernetes-ops-week.html)
|
||||
|
||||
- If you want me to train your team:
|
||||
[contact me!](https://docs.google.com/forms/d/e/1FAIpQLScm2evHMvRU8C5ZK59l8FGsLY_Kkup9P_GHgjfByUMyMpMmDA/viewform)
|
||||
|
||||
.footnote[*Thank you!*]
|
||||
@@ -11,11 +11,11 @@ class: title, in-person
|
||||
@@TITLE@@<br/></br>
|
||||
|
||||
.footnote[
|
||||
WiFi : 123_SEBASTOPOL
|
||||
<br/>
|
||||
Mot de passe : Sebastopol02
|
||||
**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[.](https://www.youtube.com/watch?v=h16zyxiwDLY)*<br/>
|
||||
*Thank you!*
|
||||
|
||||
**Slides
|
||||
[:](https://www.youtube.com/watch?v=h16zyxiwDLY)
|
||||
@@SLIDES@@**
|
||||
**Slides: @@SLIDES@@**
|
||||
]
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<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>
|
||||
<!--
|
||||
|
||||
Reference in New Issue
Block a user