Presentation is loading. Please wait.

Presentation is loading. Please wait.

Kubernetes.

Similar presentations


Presentation on theme: "Kubernetes."— Presentation transcript:

1 Kubernetes

2 About me ... DevOps Architect at TV2
Bjarte Brandt DevOps Architect at TV2 Board member: Oracle User Group Norway (OUGN) 1999 2006 2012 2017 Windows 2000, XP, Borland, Java, Oracle Database Developer, DBA, Broadcast, Sports, Elections Windows/Linux Oracle Database, Developer, python, SQL, PLSQL Linux, Oracle Database,Exadata, Exalogic, PLSQL, Storage, Network, OVM, Weblogic, Ansible Linux, Elasticsearch, Docker, Jenkins, Kafka, Rabbit MQ, Ansible, SaltStack, Terraform, Kubernetes ... Application Oracle Database DevOps

3 Let’s prepare for our live demo ...
Source in our AWS environment $. ./00_environment.sh (don’t forget the «.») Delete github repo kube-app (myblog) $./delete_repo.sh Create kubernetes cluster in AWS $./01_create_cluster.sh

4 #. /bin/bash # create s3 bucket
#!/bin/bash # create s3 bucket. This is where the cluster configuration is stored. aws s3api create-bucket \ --bucket ${CLUSTER_FULL_NAME}-state \ --region eu-central-1 \ --create-bucket-configuration LocationConstraint=eu-central-1 # enable snapshot #aws s3api put-bucket-versioning --bucket ${CLUSTER_FULL_NAME}-state --versioning-configuration Status=Enabled # we need to reference the s3 bucket export KOPS_STATE_STORE="s3://${CLUSTER_FULL_NAME}-state" kops create cluster \ --name=${CLUSTER_FULL_NAME} \ --zones=${CLUSTER_AWS_AZ} \ --master-size="t2.medium" \ --node-size="t2.medium" \ --node-count="2" \ --dns-zone=${DOMAIN_NAME} \ --ssh-public-key="~/.ssh/id_rsa.pub" \ --kubernetes-version="1.10.1" --yes

5 Container technology. Let’s dive into the world of docker.

6 Shipping code to the server is too hard.
Why containers? Shipping code to the server is too hard.

7

8 The combination of namespace and cgroup enables container technology!
Ten years ago.... Linux Kernel Namespace: isolation, Much like FreeBSD Jails, Solaris Zones. Started in ns:mnt,pid,net,ipc,uts,user. Look into /proc/pid/ns Cgroup (control group): resource management, resource accounting. Started in 2006 (Google). Merged into kernel in 2008 (2.6.24) Look at /proc/pid/cgroup (process), /proc/cgroup The combination of namespace and cgroup enables container technology!

9 Wait!! We forgot CoW! Filesystem Property CoW: Copy On Write.
When container starts, image (storage,libs,apps,etc) is availabe. Just mount. This is fast! Storage keeps track of what has changed. AUFS,overlay (file level) look into /var/lib/docker/…. DeviceMapper (RHEL) (block level) BTRFS, ZFS (FS level)

10

11

12 Container Deployment

13 $git push hook

14

15 Kubernetes

16

17 Kubernetes can help us ... Where are my containers running? I need an overview. (labels) How much resources are my containers consuming? We want to focus on the application side of our service, not infrastructure. And a lot more ... (deployment,scale,operations,monitoring,health)

18 What is Kubernetes?

19 Basic Concepts – API Objects
Pods – one or more containers Labels / Selectors – labels are queried by selectors Replication Controllers / ReplicaSets Deployments - bring up Pods and RelicaSets Services - NodePort,LoadBalancer,External StatefulSet DaemonSet All resources can be expressed as YAML or JSON files.

20

21

22

23

24 1. 2. 3. 4. 5. Demo: Our blog site Create some blog content
$ hugo new site kube-app $ hugo new posts/handy-bash-one-liners.md $ hugo new posts/kubectl.md 2. 3. 4. 5.

25

26

27

28

29

30


Download ppt "Kubernetes."

Similar presentations


Ads by Google