Adam Płaczek
Deployment and testing done on a laptop
No worries about HA
No worries about deployment
No worries about scaling up
Provisioning and deployment of multiple containers
Ensuring containers availability
Scaling up or down
Load Balancing
Service Discovery
Secrets management
Health monitoring
Allocation of resources between containers
External exposure of services to the outside world
...............
Kubernetes ( aka K8s )
Docker swarm
Mesos + Marathon
Nomad
Out of the box K8s provides collection of collaborating services which provide full container orchestration functionality.
Widely adopted -all major cloud vendors provide managed K8s clusters GKE, EKS, AKS
Nomad focus is workload scheduling and cluster management without additional stuff like Service Discovery, Secret Management etc.
KUBECTL
command line too to interact with K8 cluster
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: super-saiyan-app-1.0
spec:
replicas: 2
template:
metadata:
labels:
name: super-saiyan-app
version: "1.0"
spec:
containers:
- name: super-saiyan-app
image: brudnyhenry/super-saiyan-app:v1
ports:
- name: http
containerPort: 8080
kubectl apply -f deployment.yaml
apiVersion: v1
kind: Service
metadata:
name: super-saiyan-app
labels:
name: super-saiyan-app
spec:
ports:
- name: http
protocol: "TCP"
port: 8080
targetPort: 8080
selector:
name: super-saiyan-app
version: "1.10"
type: LoadBalancer
kubectl apply -f service.yaml
kubectl expose deployment super-saiyan-app --type=LoadBalancer --name=my-service
kubectl port-forward deployment/demoapp 8080:8080
curl localhost:8080
Access your deployments without exposing them to external network
https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/
docker run -p 80:80 -p 443:443 -v /opt/rancher:/var/lib/rancher rancher/rancher:latest
https://k3s.io/
Create Kubernetes cluster in AWS EC2
Deploy custom app
Upgrade
Create Rancher server AWS EC2
App Monitoring