KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

93
Pushing Kubernetes Forward Brandon Philips @brandonphilips | [email protected] | coreos.com

Transcript of KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Page 1: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

PushingKubernetes Forward

Brandon Philips@brandonphilips | [email protected] | coreos.com

Page 2: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

CoreOS, Inc (2013 - today)Mission: "Secure the Internet"

Started at the OS level: CoreOS Linux● Modern, minimal operating system● Self-updating (read-only) image● Updates must be automatic and seamless

Page 3: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

app1app2app3

server1

app4app5

server2

app6app7

server3

Page 4: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

app1app2app3

server1

app4app5

server2

app6app7

server3

updating...

Page 5: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

app1app2app3

server1

app4app5

server2

app6app7

server3

needs reboot

Page 6: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

app1app2app3

server1

app4app5

server2

app6app7

server3

rebooting...

Without orchestration

Page 7: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

app1app2app3

server1

app4app5

server2

app6app7

server3

rebooting...

Without orchestration

Page 8: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

app1app2app3

server1

app4app5

server2

app6app7

server3

needs reboot

With orchestrationmagical

orchestrator

Page 9: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

server1

app4app5app1app3

server2

app6app7app2

server3

needs reboot

With orchestrationmagical

orchestrator

Page 10: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

server1

app4app5app1app3

server2

app6app7app2

server3

rebooting...

With orchestrationmagical

orchestrator

Page 11: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

server1

app4app5app1app3

server2

app6app7app2

server3

updated!

With orchestrationmagical

orchestrator

Page 12: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

app2app3

server1

app4app5app1

server2

app6app7

server3

updated!

With orchestrationmagical

orchestrator

Page 13: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

app2app3

server1

app4app5app1

server2

app6app7

server3

With orchestration

Page 14: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

90+ Projects on GitHub, 1,000+ Contributors

OPEN SOURCE

CoreOS.com - @coreoslinux - github/coreos

Secure solutions, support plans, training + more

ENTERPRISE

[email protected] - tectonic.com - quay.io

Page 15: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Product Management via Keynote

Users running Kubernetes infrastructure

Community building Kubernetes

Businesses building products on Kubernetes

Page 16: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Where We Are Pushing Kubernetes

Simpler to deploy and configure clusters

Increasing scale of clusters throughout stack

Security based on good practices

rkt engine powering Kubernetes nodes

Standards to ensure portability

Page 17: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Simpler Deploymentself-hosted k8s

Page 18: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

workerkubelet

workerkubelet

workerkubelet

scheduler& API

workerkubelet

workerkubelet

workerkubelet

workerkubelet

Page 19: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

API Server

scheduler controllermanager

Page 20: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

And a few more pieces in containers

DNS addon replica set

Heapster and InfluxDB

Networking daemon set

Identity and authz services

Page 21: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

How do we install it all?

Manually place configuration

Cloud-config and bash

Config management

Page 22: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

How do we install it all?

Manually place configuration

Cloud-config and bash

Config management

Page 23: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

How do we upgrade it all?

Page 24: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

$ monokube --nodes=172.17.8.101,172.17.8.102,...

monokube - a prototype

ssh reverse tunnel

Page 25: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

$ monokube --nodes=172.17.8.101,172.17.8.102,...

monokube - a prototype

deploy API server

Page 26: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

$ monokube --nodes=172.17.8.101,172.17.8.102,...

monokube - a prototype

re-configure API cfg

Page 27: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Self-hosting Kubernetes Pivot

Page 28: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

kubectl

Self-hosting Kubernetes Pivot

Page 29: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

That seems hard, what do we get?

Bootstrap requirements down to working SSH

Rolling updates for Kubernetes itself!

Kubelet version controlled by API

Help Wanted! Goal: working in v1.3

Page 30: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Simpler Deploymentjoin sig-high-availability

Page 31: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Increasing Scalescheduler improvements

Page 32: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

https://coreos.com/blog/improving-kubernetes-scheduler-performance.html

10x Improvement in scheduler throughput

Ongoing work to track upstream

performance

Let's make similarly large gains in v1.3

Help wanted: Kubemark dashboard!

Page 33: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Increasing Scaleetcd v3 in k8s

Page 34: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

etcd v3.0 - "Scaling etcd to thousands of nodes"

● Efficient transport via gRPC and HTTP/2● New powerful API based on k8s use-case● Disk-backed and memory efficient storage● Incremental snapshot for consistent performance● Fix re-list issues with longer and memory-efficient

key history

Page 35: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

v3 API - Transactions

● compare and swap○ compare: foo=bar○ success: foo=bar2

● multiple object transaction○ compare: cond1=true && cond2=true○ success: pass=true○ failure: pass=false

Page 36: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

v3 API - Watches

● support multiple keys and prefixes per stream

○ watchKey(foo)

○ watchPrefix(coreos)

● support watch from historical point

○ watchKey(foo, index_of_an_hour_ago)

○ user-driven history compaction

Page 37: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

v3 API - Lease

l := lease.Create(10*second)

kv.Put("foo", "bar", l.ID)

// key will be removed without keeping // alive the leasego KeepAlive(l.id)

Page 38: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Help Wanted: mirror maker

Label queries are the new DNS

Need API mirrors to give queries 100% uptime

Help wanted, no work started.

Page 39: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

When is the release?

Page 40: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

When is it in k8s?

● etcd v3 k8s issue #22448○ Refactoring the storage interface○ Proof of concept working

Page 41: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Increasing Scalejoin sig-scalability

Page 42: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Security Through IdentityOIDC in Kubernetes

Page 43: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Dex - OIDC Provider

Open source standards based identity-providerSQL, LDAP, and other identity backend connectorsApplicable outside of Kubernetes but that is our use case

Page 44: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

OIDC

Relying Party

Page 45: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

OIDC

End User

Page 46: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

OIDC

Identity Provider

Page 47: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

OIDC

Identity Provider

Page 48: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

OIDC

Identity Provider

Page 49: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

OIDC

Identity Provider

Page 50: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

OIDC

0. Relying party periodically syncs public key from IdP

Page 51: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

1. User request protected page

OIDC

Page 52: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

2. User redirected to auth page

OIDC

Page 53: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

3. User authenticates (cookie/pw)

OIDC

Page 54: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

4. User given authz grant

OIDC

Page 55: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

5. User presents grant to client

OIDC

Page 56: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

6. Relying party exchanges authz code for ID token

OIDC

Page 57: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

7. Client gets ID token and validate claims

OIDC

Page 58: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

JWTJSON Web Token

Page 59: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.

eyJzdWIiOiIyNDgyODk3NjEwMDEiLCJuYW1lI

joiSmFuZSBEb2UiL...

mphbmVkb2VAZXhhbXBsZS5jb20iLCJwaWN

0dXJlIjoiaHR0cDovL2V4YW1wbGUuY29tL2ph

bmVkb2UvbWUuanBnIn0.

TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeF

ONFh7HgQ

Page 60: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

{

"alg": "HS256",

"typ": "JWT"

}

Page 61: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

{

"sub": "248289761001",

"name": "Ada Richmond",

"preferred_username": "ada",

"email": "[email protected]",

"groups": ["read-prod", "admin-stage"]

}

Page 62: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Groups and Kubernetes

API server extracts user, email, groups, from OIDC token

Now what?

Page 63: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Webhook Authorizer "kind": "SubjectAccessReview", "spec": { "resourceAttributes": { "namespace": "default", "verb": "GET", "group": "group3", "resource": "pods" }, "user": "ada", "group": ["read-prod", "admin-stage" ] } authorizer service

OK?

Page 64: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Security Through IdentityOIDC in Kubernetes

Page 65: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

rkt Powered Kubernetesmid-flight engine swap

Page 66: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

a modern, secure container runtimea simple, composable tool

focused on kubernetes

Page 67: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

no central daemonno (mandatory) API

apps run directly under spawning process

rkt - simple CLI tool

Page 68: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

bash/systemd/kubelet

rkt run ...

application(s)

Page 69: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

modular architecturetake advantage of different technologies provide a consistent experience to users

rkt internals

Page 70: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Nearly complete!80% of end-to-end tests passingcAdvisor integration in progress

rktnetes today

Page 71: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

LIVE DEMO

rktnetes today

Page 72: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Goal: 100% end-to-end tests working

User may switch to rktnetes with zero suprises

rktnetes today

Page 73: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

rkt Powered Kubernetesjoin sig-node

Page 74: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Security TPM Log

Page 75: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

● TPM, Trusted Platform Module○ physical chip on the motherboard○ cryptographic keys + processor

● Used to "measure" system state● Historically just use to verify bootloader/OS (on

proprietary systems)

rkt TPM measurement

Page 76: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

● CoreOS added support to GNU Grub● rkt can now record information about running

pods in the TPM● attestable record of what images and pods are

running on a system

rkt TPM measurement

Page 77: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

rkt TPM measurement

Page 78: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

https://coreos.com/blog/coreos-trusted-computing.html

Tectonic Trusted Computing

Page 79: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

TPM Attestation in k8s

1. Generated timestamp2. Ask TPM for sig of time

+ log value3. Submit to API server in

nodeStatus

Page 80: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

TPM Attestation in k8s

Goal: Merge nodeStatus payload upstream in k8s v1.3

Page 81: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

rkt TPM measurement

For more TPM and rkt, see Matthew Garrett's talk:

"Integrated trusted computing in Kubernetes" 11:30am today

Page 82: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Security TLS Bootstrap

Page 83: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

TLS Bootstrap of Nodes (#20439)

1. Generate CSR2. Submit CSR to API

server3. Poll for approved CSR

Page 84: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

TLS Bootstrap of Nodes (#20439)

Goal: Merge proposal and working code into v1.3

Page 85: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Industry Movement

Page 86: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward
Page 87: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

● Coordinate promotion of Cloud Native architectures● A home for Cloud Native OSS projects like Kubernetes

○ Technical board to evaluate additional projects● Provides shared resources to projects like video

conferencing, test servers, etc

Page 88: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

● Creating technical standards for containers● Started with runC and a runtime specification● Large mandate to standardize an image format

○ In-progress

Page 89: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Multiple Image Formats in v1.3 API

● Today Kubernetes only supports the Docker Image Format and naming

● Use cases for executing other formats○ OCI Image Format○ tar archive chroots○ jar?○ static binary?

● Support signing and content verification

Page 90: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Help Push Kubernetes Forward

Simpler to deploy and configure clusters

Increasing scale of clusters throughout stack

Security based on good practices

rkt engine powering Kubernetes nodes

Standards to ensure portability

Page 91: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward
Page 92: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

coreos.com/fest - @coreosfestMay 9 & 10, 2016 - Berlin, Germany

Page 93: KubeCon EU 2016 Keynote: Pushing Kubernetes Forward

Thank you!

Brandon Philips@brandonphilips | [email protected] | coreos.com

We’re hiring in all departments! Email: [email protected] Positions: coreos.com/ careers