mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-22 06:16:31 +00:00
Merge branch 'master' into avril2018
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Trainer tools to create and prepare VMs for Docker workshops on AWS
|
||||
# Trainer tools to create and prepare VMs for Docker workshops on AWS or Azure
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -14,7 +14,7 @@ And if you want to generate printable cards:
|
||||
## General Workflow
|
||||
|
||||
- fork/clone repo
|
||||
- set required environment variables for AWS
|
||||
- set required environment variables
|
||||
- create your own setting file from `settings/example.yaml`
|
||||
- if necessary, increase allowed open files: `ulimit -Sn 10000`
|
||||
- run `./workshopctl` commands to create instances, install docker, setup each users environment in node1, other management tasks
|
||||
|
||||
@@ -88,9 +88,9 @@ fine for personal and development clusters.)
|
||||
helm search
|
||||
```
|
||||
|
||||
- View charts related to `gitlab`:
|
||||
- View charts related to `prometheus`:
|
||||
```bash
|
||||
helm search gitlab
|
||||
helm search prometheus
|
||||
```
|
||||
|
||||
]
|
||||
@@ -154,9 +154,10 @@ The chart's metadata includes an URL to the project's home page.
|
||||
helm create dockercoins
|
||||
```
|
||||
|
||||
- Move away the sample templates:
|
||||
- Move away the sample templates and create an empty template directory:
|
||||
```bash
|
||||
mv dockercoins/templates dockercoins/default-templates
|
||||
mkdir dockercoins/templates
|
||||
```
|
||||
|
||||
]
|
||||
@@ -193,12 +194,19 @@ The chart's metadata includes an URL to the project's home page.
|
||||
|
||||
---
|
||||
|
||||
## Testing our chart
|
||||
## Testing our helm chart
|
||||
|
||||
- We can now install our chart with `helm install dockercoins`
|
||||
.exercise[
|
||||
|
||||
(In that case, `dockercoins` is the path to the chart)
|
||||
- Let's install our helm chart! (`dockercoins` is the path to the chart)
|
||||
```bash
|
||||
helm install dockercoins
|
||||
```
|
||||
]
|
||||
|
||||
- However, since the application is already deployed, this will fail
|
||||
--
|
||||
|
||||
- Since the application is already deployed, this will fail:<br>
|
||||
`Error: release loitering-otter failed: services "hasher" already exists`
|
||||
|
||||
- To avoid naming conflicts, we will deploy the application in another *namespace*
|
||||
|
||||
@@ -137,7 +137,13 @@ Note: please DO NOT call the service `search`. It would collide with the TLD.
|
||||
|
||||
--
|
||||
|
||||
Our requests are load balanced across multiple pods.
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
@@ -208,17 +214,39 @@ class: extra-details
|
||||
|
||||
## Viewing endpoint details
|
||||
|
||||
- When we have many endpoints, the previous command truncates the list
|
||||
- When we have many endpoints, our display commands truncate the list
|
||||
```bash
|
||||
kubectl get endpoints
|
||||
```
|
||||
|
||||
- If we want to see the full list, we can use one of the following commands:
|
||||
```bash
|
||||
kubectl describe endpoint elastic
|
||||
kubectl get endpoint elastic -o yaml
|
||||
kubectl describe endpoints elastic
|
||||
kubectl get endpoints elastic -o yaml
|
||||
```
|
||||
|
||||
- These addresses will show us a list of IP addresses
|
||||
- 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
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
class: extra-details
|
||||
|
||||
## `endpoints` not `endpoint`
|
||||
|
||||
- `endpoints` is the only resource that cannot be singular
|
||||
|
||||
```bash
|
||||
$ kubectl get endpoint
|
||||
error: the server doesn't have a resource type "endpoint"
|
||||
```
|
||||
|
||||
- This is because the type itself is plural (unlike every other resource)
|
||||
|
||||
- There is no `endpoint` object: `type Endpoints struct`
|
||||
|
||||
- The type doesn't represent a single endpoint, but a list of endpoints
|
||||
|
||||
@@ -2,21 +2,23 @@
|
||||
|
||||
- We cannot have two resources with the same name
|
||||
|
||||
(Or can we...?)
|
||||
|
||||
--
|
||||
|
||||
- We cannot have two resources *of the same type* with the same name
|
||||
|
||||
(But it's OK to have a `rng` service, a `rng` deployment, and a `rng` daemon set)
|
||||
(But it's OK to have a `rng` service, a `rng` deployment, and a `rng` daemon set!)
|
||||
|
||||
--
|
||||
|
||||
- We cannot have two resources of the same type with the same name *in the same namespace*
|
||||
|
||||
(But it's OK to have e.g. two `rng` services in different namespaces)
|
||||
(But it's OK to have e.g. two `rng` services in different namespaces!)
|
||||
|
||||
--
|
||||
|
||||
- In other words: the tuple *(type, name, namespace)* needs to be unique
|
||||
- In other words: **the tuple *(type, name, namespace)* needs to be unique**
|
||||
|
||||
(In the resource YAML, the type is called `Kind`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user