Professional Documents
Culture Documents
3/ Automatyzacja
4/ Narzędzia i zasoby
Agenda
Czym jest Kubernetes
01/
unitygroup.com
4
unitygroup.com
5
Jak rozmawiać z Kubernetesem
02/
> Pod
apiVersion: v1
kind: Pod
metadata:
>
name: hello-world
spec:
containers:
- image: nginx:1.21
name: nginx
ports:
- containerPort: 80
protocol: TCP
unitygroup.com
7
> ReplicaSet / DaemonSet / Job / ...
apiVersion: v1
apiVersion: apps/v1 kind: Pod
kind: ReplicaSet spec:
metadata: containers:
>
- image: nginx:1.21
name: hello-world
name: nginx
spec:
replicas: 2
template:
spec: apiVersion: v1
containers: kind: Pod
spec:
- image: nginx:1.21
containers:
name: nginx - image: nginx:1.21
name: nginx
unitygroup.com
8
> Deployment
apiVersion: v1
kind: Pod
spec:
apiVersion: v1 apiVersion: v1 ...
kind: Deployment kind: ReplicaSet
metadata: metadata:
> >
name: hello-world name: hello-world apiVersion: v1
spec: spec: kind: Pod
replicas: 3 replicas: 3 spec:
selector: selector: ...
matchLabels: matchLabels:
name: hello-world name: hello-world
template: template:
...szablon setu... ...szablon setu... apiVersion: v1
kind: Pod
spec:
...
unitygroup.com
9
> Service
apiVersion: v1
kind: Service
metadata:
>
name: moj-serwis
spec: Stały adres IP
selector:
Oraz nazwa DNS która
app: moja-aplikacja
ports: na niego wskazuje
- protocol: TCP
port: 80
targetPort: 3137
unitygroup.com
10
> Ingress
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
spec:
>
ingressClassName: nginx
rules: Load Balancer kierujący
- http:
paths: ścieżkę /api do
- path: /api wybranego serwisu
pathType: Prefix
backend:
service:
name: moj-serwis
port:
number: 80
unitygroup.com
11
Automatyzacja
03/
> Helm
Environment: PR
wordpress/
Chart.yaml
LICENSE
README.md Environment: QA
values.yaml
values.schema.json
charts/
crds/
templates/
templates/NOTES.txt
unitygroup.com
13
> Flux
unitygroup.com https://fluxcd.io/
14
Narzędzia i zasoby
04/
> Własny klaster Kubernetes
Microk8s
Zero-ops, pure-upstream Kubernetes,
from developer workstations to production.
https://microk8s.io/
K3s
The lightweight Kubernetes distribution, certified and built for IoT & Edge
computing
https://k3s.io/
unitygroup.com
16
> k9s
unitygroup.com https://k9scli.io/
17
> K8S Lens – the Kubernetes IDE
unitygroup.com https://k8slens.dev/
18
> Kubernetes in Action
unitygroup.com https://www.manning.com/books/kubernetes-in-action
19
> Materiały dodatkowe do prezentacji
https://github.com/lpiob/phpers-summit-2022
unitygroup.com
20
400 Developers
Łukasz Biegaj
#meetUteam
Przyjdź i poznaj nas na naszym
stanowisku!
Thank You
unitygroup.com