(necessary)
If you can’t feed a team with two pizzas, it’s too large. That limits a task force to five to seven people, depending on their appetites
Jeff Bezos
n = # of people
=> 15 links
=> 66 links
=> 1225 links
Two-pizza team (n=6)
2x two-pizza team
My company (~50 ppl)
(simple one)
by @gutek
by @gutek
by @gutek and me :)
by @gutek
by @gutek
Uwaga: NIEBEZPIECZEŃSTWO
apiVersion: apps/v1
kind: Deployment
metadata:
name: #{ApplicationName}#
spec:
selector:
matchLabels:
app: #{ApplicationName}#
replicas: 2
template:
metadata:
labels:
app: #{ApplicationName}#
spec:
containers:
- name: #{ApplicationName}#
image: #{image}#
ports:
- containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
name: #{ApplicationName}#
spec:
selector:
app: #{ApplicationName}#
ports:
- protocol: TCP
port: 80
targetPort: 80
type: ClusterIP
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: #{ApplicationName}#
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: internal
spec:
rules:
- http:
paths:
- path: /
backend:
serviceName: #{ApplicationName}#
servicePort: 80
host: #{ApplicationName}#-app-#{EnvironmentName}#.internal.comapny.com
tls:
- secretName: internal.comapny.com
hosts:
- #{ApplicationName}#-app-#{EnvironmentName}#..internal.comapny.com
# prepare variables
export IMAGE=poznajkubernetes/pkad:red
# replace variables
envsubst < yaml/template.yaml > yaml/dep-ready.yaml
# validate
kubeval --strict yaml/dep-ready.yaml
# apply
kubectl apply -f yaml/dep-ready.yaml
# check rollout status
if ! kubectl rollout status deployment pkad-dep; then
# rollback
kubectl rollout undo deployment pkad-dep;
# rollback status
kubectl rollout status deployment pkad-dep;
echo "ERROR - should exit ;)"
fi
Kubernetes-based event-driven autoscaling.
by