Â
Fernando Ripoll
Â
It is an open source system to manage containerised applications across multiple hosts, providing basic mechanisms for deployment, maintenance and
scaling of applications
Â
Â
K8s is composed by a master and minions (nodes). A master contains the key components and nodes connect to it via an secure API thanks to an agent.
Â
Â
Â
It uses a container networking provider to create a VXLAN
Â
Â
It is a command line interface for running commands against the cluster(s)
kubectl [command] [TYPE] [NAME] [flags]
Â
They  are persistent entities used to represent the state of your cluster (defined as yaml or json docs).
Labels are key/value attached to objects for organazing and select group of objects
 apiVersion: #version of the Kubernetes API
 kind: #object type to create
 metadata: #name, labels, namespace
 spec: #Specification like container image, restart policy,...
The most basic resourceÂ
Lets create a pod object definition
 apiVersion: v1
 kind: Pod
 metadata:
   name: single-pod
 spec:
   containers:
    - name: my-awesome-app
      image: 172.17.4.1:5000/my-awesome-app:0.0.0
Lets create a pod object definition with multiple containers
app
echo
 shared-data
Multi container pod example
curl
Is a controller that helps to control pods
 apiVersion: v1
 kind: ReplicaSet
 metadata:
   name: my-awesome-app
 spec:
  replicas: 3
  template:
   containers:
      - name: my-awesome-app
        image: 172.17.4.1:5000/my-awesome-app:0.0.2
Is a controller one level upÂ
The specification is the same as previous example
 apiVersion: v1
 kind: Deployment
 metadata:
   name: my-awesome-frontend-app
 spec:
  replicas: 2
  template:
   containers:
      - name: my-awesome-app
        image: 172.17.4.1:5000/my-awesome-frontend-app:0.0.1
Group a set of pods under an IP
 apiVersion: v1
 kind: Service
 metadata:
   name: mongo
 spec:
  selector:
​    db: mongo
  ports:
   - port: 27017
    protocol: TCP
Other useful resources available
Interested projects running upon k8s
Â
Code available onÂ
https://github.com/pipo02mix/why_k8s_can_make_our_life_easier
Â
@pipo02mix
info@tiatere.es