initial: add day one instructions
Also, add instructions to execute this repo.
This commit is contained in:
commit
8a320542e3
3
.mise.toml
Normal file
3
.mise.toml
Normal file
@ -0,0 +1,3 @@
|
||||
[tools]
|
||||
kind = "0.22.0"
|
||||
kubectl = "1.29.4"
|
37
README.md
Normal file
37
README.md
Normal file
@ -0,0 +1,37 @@
|
||||
# Descomplicando `Kubernetes`
|
||||
|
||||
## Preparando o ambiente
|
||||
|
||||
Para facilitar a instalação dos _softwares_ necessários utilizo o [`mise`][mise] como gestor de ferramentas e _runtimes_.
|
||||
|
||||
A instalação do [`mise`][mise] pode ser feita seguindo o [guia de uso][mise-guide].
|
||||
|
||||
Com o [`mise`][mise] instalado, executamos o seguinte comando para instalar as ferramentas:
|
||||
|
||||
```bash
|
||||
mise install
|
||||
```
|
||||
|
||||
E, para garantir que tudo esta correto, podemos verificar a instalação rodando:
|
||||
|
||||
```bash
|
||||
mise current
|
||||
```
|
||||
|
||||
O resultado esperado é:
|
||||
|
||||
```
|
||||
kind 0.22.0
|
||||
kubectl 1.29.4
|
||||
```
|
||||
|
||||
## Curso por dias
|
||||
|
||||
* [dia-01][dia-01]: subindo primeiro _cluster_ com [`kind`][kind] e fazendo _deploy_ do primeiro `pod`
|
||||
|
||||
Pode ser seguido em no
|
||||
|
||||
[mise]: https://mise.jdx.dev/
|
||||
[mise-guide]: https://mise.jdx.dev/getting-started.html#quickstart
|
||||
[kind]: https://kind.sigs.k8s.io/
|
||||
[dia-01]: ./day-001/README.md
|
23
day-001/README.md
Normal file
23
day-001/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Descomplicando `Kubernetes` - Dia 01
|
||||
|
||||
## Criando o _cluster_ com [`kind`][kind]
|
||||
|
||||
Para subir o _cluster_ com as [configurações especificadas][kind-config], executaremos:
|
||||
|
||||
```bash
|
||||
kind create cluster --config ./kind-cluster.yml --name dk8s-day-001
|
||||
```
|
||||
|
||||
## _Deploy_ do `pod` aplicando o manifesto
|
||||
|
||||
Com o _cluster_ rodando, podemos subir um novo `pod` usando o comando:
|
||||
|
||||
```bash
|
||||
kubectl apply -f pod.yml
|
||||
```
|
||||
|
||||
[Voltar para o `README`][readme]
|
||||
|
||||
[kind]: https://kind.sigs.k8s.io/
|
||||
[kind-config]: ./kind/kind-cluster.yml
|
||||
[readme]: ../README.md
|
7
day-001/kind/kind-cluster.yml
Normal file
7
day-001/kind/kind-cluster.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
kind: Cluster
|
||||
nodes:
|
||||
- role: control-plane
|
||||
- role: worker
|
||||
- role: worker
|
18
day-001/pod.yml
Normal file
18
day-001/pod.yml
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
run: server
|
||||
name: server
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx
|
||||
name: server
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources: {}
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
status: {}
|
Loading…
x
Reference in New Issue
Block a user