Kops = Kubernetes per tutti

Похожие документы
Introduzione a Kubernetes

DevOps di applicazioni Python (e non solo) su OpenShift. Francesco Fiore, System Architect PyCon Nove, 20 aprile 2018

Orchestrazione di contenitori

Installing and Configuring Windows Server 2012 (MOC 20410)

Docker. Architettura dei Sistemi Software. Luca Cabibbo. dispensa asw660 marzo Fonti. Docker.

Contenitori. Subhraveti, D. Containers Beyond the Hype. AppOrbit, 2015.

Red Hat OpenShift: i container per il mondo enterprise

Get Started: Storeden Connect API

MOC20740 Installation, Storage, and Compute with Windows Server 2016

Composizione e orchestrazione di contenitori Docker

ORA1144 Oracle WebLogic Server 12c: Administration I

Composizione e orchestrazione di contenitori Docker

Docker. Architettura dei Sistemi Software. Luca Cabibbo. dispensa asw890 marzo Fonti

Docker. Architettura dei Sistemi Software. Luca Cabibbo. dispensa asw650 marzo Fonti. Docker.

AWS Una rapida introduzione al Cloud. Simone

Docker Corsi Linux 2019

Esercitazione su Yocto Project

Realizzazione di containers docker per l uso interattivo del software di CMS e per la creazione di un nodo Grid on-demand su risorse opportunistiche

Cloud Simulator and Smart Cloud based on Knowledge Base

CLOUD AWS. #cloudaws. Community - Cloud AWS su Google+ Amazon Web Services. Amazon VPC (Virtual Private Cloud)

Hot Backup, Performance Monitoring & DR. Francesco Speciale Country Manager Italy fspeciale@vizioncore.com

Tutorial installazione Oracle e Sql Developer (Ubuntu 16.04)

CLOUD AWS. #cloudaws. Community - Cloud AWS su Google+ Amazon Web Services. Amazon EC2 - Utilizzo del servizio

OpenStack Self Data Center: il cloud computing secondo TIM

I veri benefici dell Open Source nell ambito del monitoraggio IT. Georg Kostner, Department Manager Würth Phoenix

Kubernetes : la piattaforma di Google per la gestione dei container

Configurazione Public Network e Load Balancer as a Service. Stefano Nicotri INFN - Sezione di Bari

Contratto Quadro SPC Cloud Lotto 1 CaaS - Enterprise Container as a Service Specifiche del Servizio

Contratto Quadro SPC Cloud Lotto 1 CaaS - Enterprise Container as a Service Specifiche del Servizio

Downloading and Installing Software Socio TIS

Nuvola It Data Space Easy Reseller Tutorial per l Amministratore. Top Clients Marketing ICT services

MOC10982 Supporting and Troubleshooting Windows 10

PuRo Mail Server. A mail server based on Amazon Web Service. C. Pupparo D. Rossato

MIMO CPE Serie Access-Point Wireless 2x2 MiMo 5GHz Outdoor Directive CPE

CORSO CWS-215: CWS-215 Citrix Virtual Apps and Desktops 7 Administration. CEGEKA Education corsi di formazione professionale

Nuvola It Data Space Easy Tutorial per l Amministratore. Telecom Italia Business/Marketing Top Clients Marketing ICT services

CLOUD AWS. #cloudaws. Community - Cloud AWS su Google+ Amazon Web Services. Amazon Route 53

Piattaforme Software Distribuite. Roberto Beraldi

Транскрипт:

!1 Kops = Kubernetes per tutti Introduzione al cluster Kubernetes secondo Kops di Valentino Pistis

!2 Chi sono? Guasila Software Engineer Padre...durante il tempo libero

!3 Cos'è un cluster Wikipedia: è un insieme di computer connessi tra loro tramite una rete telematica.

!4 Cos'è un cluster cluster di computer fisici

!5 Cos'è un cluster computer virtuali

!6 Cos'è un cluster cluster di containers? No...ma quasi...

!7 Cos'è un container LXC -> linux containers

!8 Cos'è un container Wikipedia: Linux Container...è un ambiente di virtualizzazione a container, che opera a livello del sistema operativo e permette di eseguire diversi ambienti Linux virtuali isolati tra loro...

!9 Cos'è un container

!10 Kubernetes Wikipedia: e' un sistema di orchestrazione e gestione di container.

!11 Kubernetes Architettura

!12 Kubernetes Pods Un POD rappresenta un processo in esecuzione sul cluster kubernetes

!13 Kubernetes Deployments

!14 Kubernetes apiversion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: k8s-app: myapp spec: replicas: 3 selector: matchlabels: k8s-app: myapp template: metadata: labels: k8s-app: myapp spec: containers: - name: nginx image: nginx:1.15.4 resources: limits: cpu: 200m memory: 700Mi requests: cpu: 100m memory: 500Mi ports: - containerport: 80

!15 Kubernetes Services

!16 Kubernetes apiversion: v1 kind: Service metadata: labels: k8s-app: myapp name: myapp-service namespace: my-namespace annotations: spec: ports: - name: http port: 80 protocol: TCP targetport: 80 - name: https port: 443 protocol: TCP targetport: 80 selector: k8s-app: myapp sessionaffinity: None type: ClusterIP

!17 Kubernetes Ingress

!18 apiversion: extensions/v1beta1 kind: Ingress metadata: name: myapp-ingress namespace: my-namespace annotations: spec: rules: - host: myapp.org http: paths: - path: backend: servicename: myapp-service serviceport: 80 Kubernetes

!19 Kubernetes Persistent Volumes

!20 Kubernetes apiversion: v1 kind: PersistentVolumeClaim metadata: name: pvc-my-disk namespace: my-namespace spec: accessmodes: - ReadWriteOnce resources: requests: storage: 3Gi

!21 Kubernetes Horizontal Pod Autoscaler

!22 Kubernetes apiversion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: name: myapp-hpa namespace: my-namespace spec: scaletargetref: apiversion: apps/v1beta1 kind: Deployment name: myapp minreplicas: 1 maxreplicas: 10 metrics: - type: Resource resource: name: cpu targetaverageutilization: 90 - type: Resource resource: name: memory targetaverageutilization: 90

!23 Kubernetes Cluster Autoscaler

!24 Kubernetes Monitoring e Logging

!25 Kubernetes Site Reliability Engineering: is a discipline that incorporates aspects of software engineering and applies that to IT operations problems

!26 Kubernetes Creazione cluster

!27 Kops Come funziona

!28 Kops

!29 Kops macos: brew update && brew install kops installare kops Linux: curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest grep tag_name cut -d '"' -f 4)/kops-linux-amd64 chmod +x kops-linux-amd64 sudo mv kops-linux-amd64 /usr/local/bin/kops

!30 Kops IAM per kops aws iam create-group --group-name kops aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/amazonec2fullaccess --groupname kops aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/amazonroute53fullaccess --groupname kops aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/amazons3fullaccess --group-name kops aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/iamfullaccess --group-name kops aws iam attach-group-policy --policy-arn arn:aws:iam::aws:policy/amazonvpcfullaccess --groupname kops aws iam create-user --user-name kops aws iam add-user-to-group --user-name kops --group-name kops aws iam create-access-key --user-name kops

!31 Kops S3 Bucket per cluster state storage aws s3api create-bucket --bucket my-cluster-state-store --region aws-region -- create-bucket-configuration LocationConstraint=aws-region aws s3api put-bucket-versioning --bucket my-cluster-state-store --versioningconfiguration Status=Enabled`

!32 Kops Un solo comando Kops per accendere Kubernetes su AWS: kops create cluster --cloud aws --zones aws-zone my-cluster-name --yes Un solo comando per distruggere: kops delete cluster --name my-cluster-name --yes Due comandi per aggiornare il cluster: kops update cluster my-cluster-name --yes kops rolling-update cluster my-cluster-name --yes

!33 kops validate cluster Comandi utili

!34 Comandi utili vpistis@vpistismacbookair (my-kube-cluster-name namespace) ~> kops validate cluster Using cluster from kubectl context: my-kube-cluster-name Validating cluster my-kube-cluster-name INSTANCE GROUPS NAME ROLE MACHINETYPE MIN MAX SUBNETS app-nodes Node t2.large 1 20 eu-west-2b db-nodes Node t2.large 1 8 eu-west-2b master-eu-west-2b Master c4.large 1 3 eu-west-2b NODE STATUS NAME ROLE READY ip-x-x-x-x.eu-west-2.compute.internal node True ip-x-x-x-x..eu-west-2.compute.internal node True ip-x-x-x-x..eu-west-2.compute.internal node True ip-x-x-x-x..eu-west-2.compute.internal master True ip-x-x-x-x..eu-west-2.compute.internal node True ip-x-x-x-x..eu-west-2.compute.internal node True Your cluster my-kube-cluster-name is ready

!35 Comandi utili kubectl top pods kubectl top nodes kubectl apply -f config-file.yaml

!36 Comandi utili kubectl top pods NAME CPU(cores) MEMORY(bytes) deployment-name-xxxxxxx-xxxxxx 18m 53Mi kubectl top nodes NAME CPU(cores) CPU% MEMORY(bytes) MEMORY% ip-x-x-x-x.eu-west-2.compute.internal 415m 20% 5236Mi 66% ip-x-x-x-x.eu-west-2.compute.internal 108m 5% 4845Mi 61%

!37 Kops Kubernetes Dashboard

!38 Kops e ora? Docker: la tua applicazione web Load Balancer: Zalando skipper e aws ingress controller.. Logging: Fluentd, Mongo, ElasticSearch... Monitoring: Prometheus, Grafana...

!39 Grazie! Valentino Pistis github: @vpistis