tell us what you want to learn! • Ecosystem • Quarterly meetups or more frequently if possible • Looking for sponsors, organizers, speakers (reach us via meetup.com) 5
Container ecosystem: Docker and Rkt • Networking, storage and scheduling for K8s • Using Kubernetes with CM, CI/CD • Unique use cases and how Kubernetes helped your team/company • Deploying and using Kubernetes in production in the enterprise • Containerized App Development • PaaS, IaaS integrations • Cool new tech and how it can be used with Kubernetes • Kubernetes + IoT • Day 2 Operations (monitoring, troubleshooting, upgrades) of K8s cluster • Orchestrating multi-host, multi-container, distributed applications • Using Kubernetes to manage and secure your application infrastructure
Laptop QA Stage Production OS OS X Windows Debian Debian Debian Frontend nginx (homebrew) nginx (download) nginx (apt-get) nginx (apt-get) nginx (apt-get) Services php (homebrew) php (download) php (apt-get) php (apt-get) php (apt-get) Database mysql (download) mysql (download) mysql (apt-get) mysql (apt-get) mysql (apt-get) Logs /usr/local/etc/nginx/logs/ C:\nginx-1.9.5\logs /var/log/nginx/ /var/log/nginx/ /var/log/nginx/
24 Co-locating helper processes Mounting storage systems Distributing secrets Application health checking Replicating application instances horizontal auto-scaling Naming and discovery Load balancing Rolling updates resource Monitoring Log access and ingestion support for debugging
Provide access to all portable K8s features Develop against local K8s Cluster • Lightweight single-command installation • Works across Limux, Mac OSx and Windows • Include all dependencies • Local cluster can managed via kubectl • Built-in Dashboard Status: GA since Kubernetes 1.3 Check out: Minikube repo!
as an Addon Dashboard UI allows to: • get an overview of applications running on the cluster • deploy containerized applications to a Kubernetes cluster • troubleshoot containerized applications • manage the cluster and its resources itself Kubernetes 1.4 Dashboard UI exposes 90% of resources that accesible via kubectl API.
on any machine able to access the API server $ kubectl run echoserver \ --image=gcr.io/google_containers/echoserver:1.4 \ --port=8080 deployment "echoserver" created
to manage several Kubernetes clusters Configure kubectl context on the local environments: • kubectl config set-cluster kubernetes --server=http://<master_IP>:8080 • kubectl config set-context kubelet-context --cluster=kubernetes --user="" • kubectl config use-context kubelet-context Verify kubectl Configuration and Connection: • kubectl config view The resulting kubeconfig file will be stored in ~/.kube/config and can be sourced at any time afterwards.
Volume Consumers git Repo Logical Application Can be used to group multiple containers & shared volumes Containers within a pod are tightly coupled Shared namespaces • Containers in a pod share IP, port and IPC namespaces • Containers in a pod talk to each other through localhost Ephemeral
formats YAML and JSON. Each format can describe the same function of K8s: • YAML The YAML format is very simple with less syntax rules. Refer to http://www.yaml.org/spec/1.2/spec.html The following example uses the YAML format to set up the nginx pod: • JSON The JSON format is also simple and easy to read by humans, but more program-friendly. Because it has data types (number, string, Boolean, and object), it is popular to exchange the data between systems. Refer to http://json.org/ • SWAGGER There is an alternative way, because Kubernetes is also using swagger (http://swagger.io/) to generate the REST API; therefore, you can access swagger-ui via http://<kubernetes-master>:8080/swagger-ui/. Example of configs: https://github.com/kubernetes/kubernetes/tree/master/examples 39
any API object • Generally represent identity • Queryable by selectors – think SQL ‘select ... where ...’ • The only grouping mechanism – pods under a ReplicationController – pods in a Service – capabilities of a node (constraints) Example: “phase: Dev”
pods • Makes sure that the cluster is in the specified state • Runs in Controller Manager Controller types • Replication controller (soon to be deprecated) Responsible for running the specified number of pod’s copies ("replicas") across the cluster • Deployment controller (prefered way: next gen. RC) Responsible for changing the actual state to the desired state at a controlled rate
1.3 64 64 ... Defines a desired state for logical group of • Pods • Replica Sets (RS) Deployment controller drives the actual state to the desired state at a controlled rate • Creates new resources, if necessary • Replaces the existing resources, if necessary Deployment can be • Updated • Rolled out • Rolled back