DockerCon workshops: Which one will you be attending?

Following in last year’s major success, we are excited to be bringing back and expand the paid workshops at 2017. The pre-conference workshops will focus on a range of subjects from Docker 101 to deep dives in networking, Docker for JAVA and  advanced orchestration. Each workshop is designed to give you hands-on instruction and insight on key Docker topics, taught by Docker Engineers and Docker Captains. The workshops are a great opportunity to get better acquainted and excited about Docker technology to start off DockerCon week.

Take advantage of the lowest DockerCon pricing and get your Early Bird Ticket + Workshop now! Early Bird Tickets are limited and will sell out in the next two weeks!
Here are the basics of the DockerCon workshops:
Date: Monday, April 17, 2017
Time: 2:00pm &; 5:00pm
Where: Austin Convention Center &8211; 500 E. Cesar Chavez Street, Austin, TX
Cost: $150
Class size: Classes will remain small and are limited to 50 attendees per class.
Registration: The workshops are only open to DockerCon attendees. You can register for the workshops as an add-on package through the registration site here.

Below are overviews of each workshop. To learn more about each topic head over to the DockerCon 2017 registration site.
Learn Docker
If you are just getting started learning about Docker and want to get up to speed, this is the workshop for you. Come learn Docker basics including running containers, building images and basics on networking, orchestration, security and  volumes.
Orchestration Workshop: Beginner
You&;ve installed Docker, you know how to run containers, you&8217;ve written Dockerfiles to build container images for your applications (or parts of your applications), and perhaps you&8217;re even using Compose to describe your application stack as an assemblage of multiple containers.
But how do you go to production? What modifications are necessary in your code to allow it to run on a cluster? (Spoiler alert: very little, if any.) How does one set up such a cluster, anyway? Then how can we use it to deploy and scale applications with high availability requirements?
In this workshop, we will answer those questions using tools from the Docker ecosystem, with a strong focus on the native orchestration capabilities available since Docker Engine 1.12, aka &;Swarm Mode.&;
Orchestration Workshop: Advanced
Already using Docker and recently started using Swarm Mode in 1.12? Let’s start where previous Orchestration workshops may have left off, and dive into monitoring, logging, troubleshooting, and security of docker engine and docker services (Swarm Mode) for production workloads. Pulled from real world deployments, we&8217;ll cover centralized logging with ELK, SaaS, and others, monitoring/alerting with CAdvisor and Prometheus, backups of persistent storage, optional security features (namespaces, seccomp and apparmor profiles, notary), and a few cli tools for troubleshooting. Come away ready to take your Swarm to the next level!
Stay tuned as more workshop topics will be announced in the coming weeks! The workshops will sell out, so act fast and add the pre-conference workshops to your DockerCon 2017 registration!
Docker Networking
In this 3-hour, instructor-led training, you will get an in-depth look into Docker Networking. We will cover all the networking features natively available in Docker and take you through hands-on exercises designed to help you learn the skills you need to deploy and maintain Docker containers in your existing network environment.
Docker Store for Publishers
This workshop is designed to help potential Docker Store Publishers to understand the process, the best practices and the workflow of creating and publishing great content. You will get to interact with the members of the Docker Store’s engineering team. Whether you are an established ISV, a startup trying to distribute your software creation using Docker Containers or an independent developer, just trying to reach as many users as possible, you will benefit from this workshop by learning how to create and distribute trusted and Enterprise-ready content for the Docker Store.
Docker for Java Developers
Docker provides PODA (Package Once Deploy Anywhere) and complements WORA (Write Once Run Anywhere) provided by Java. It also helps you reduce the impedance mismatch between dev, test, and production environment and simplifies Java application deployment.
This workshop will explain how to:

Running first Java application with Docker
Package your Java application with Docker
Sharing your Java application using Docker Hub
Deploy your Java application using Maven
Deploy your application using Docker for AWS
Scaling Java services with Docker Engine swarm mode
Package your multi-container application and use service discovery
Monitor your Docker + Java applications
Build a deployment pipeline using common tools

Hands-On Docker for Raspberry Pi
Take part in our first-of-a-kind hands-on Raspberry Pi and Docker workshop where you will be given all the hardware you need to start creating and deploying containers with Docker including an 8-LED RGB add-on from Pimoroni. You will learn the subtleties of working with an ARM processor and how to control physical hardware through the GPIO interface. Programming experience is not required but a basic understanding of Python is helpful.
Microservices Lifecycle Explained Through Docker and Continuous Deployment
The workshop will go through the whole microservices development lifecycle. We’ll start from the very beginning and define and design architecture. From there on we’ll do some coding and testing all the way until the final deployment to production. Once our new services are up and running we’ll see how to maintain them, scale them, and recover them in case of failures. The goal will be to design a fully automated continuous deployment (CDP) pipeline with Docker containers.
During the workshop we’ll explore tools like Docker Engine with built in orchestration via swarm mode,, Docker Compose, Jenkins, HAProxy, and a few others.
Modernizing Monolothic ASP.NET Applications with Docker
Learn how to use Docker to run traditional ASP.NET applications In Windows containers without an application re-write. We’ll use Docker tools to containerize a monolithic ASP.NET app, then see how the platform helps us iterate quickly &8211; pulling high-value features out of the app and running them in separate containers. This workshop gives you a roadmap for modernizing your own ASP.NET workloads.

What dockercon workshop will you be attending? Limited number of spots => save yours now!Click To Tweet

The post DockerCon workshops: Which one will you be attending? appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

containerd livestream recap

In case you missed it last month, we announced that is extracting a key component of its platform, a part of the engine plumbing called  &; a core container runtime – and committed to donating it to an open foundation.
You can find up-to-date roadmap, architecture and API definitions in the Github repository, and more details about the project in our engineering team’s blog post.

You can also watch the following video recording of the containerd online meetup, for a summary and Q&A with Arnaud Porterie, Michael Crosby, Stephen Day, Patrick Chanezon and Solomon Hykes from the Docker team:

Here is the list of top questions we got following this announcement:
Q. Are you planning to run docker without runC ?
A. Although runC is the default runtime, as of  Docker 1.12, it can be replaced by any other OCI-compliant implementation. Docker will be compliant with the OCI Runtime Specification
Q. What major changes are on the roadmap for swarmkit to run on containerd if any? 
A. SwarmKit is using Docker Engine to orchestrate tasks, and Docker Engine is already using containerd for container execution. So technically, you are already using containerd when using SwarmKit. There is no plan currently to have SwarmKit directly orchestrate containerd containers though.
Q. Mind sharing why you went with GRPC for the API?
A. containerd is a component designed to be embedded in a higher level system, and serve a host local API over a socket. GRPC enables us to focus on designing RPC calls and data structures instead of having to deal with JSON serialization and HTTP error codes. This improves iteration speed when designing the API and data structures. For higher level systems that embed containerd, such as Docker or Kubernetes, a JSON/HTTP API makes more sense, allowing easier integration. The Docker API will not change, and will continue to be based on JSON/HTTP.
Q. How do you expect to see others leverage containerd outside of Docker?
A. Cloud managed container services such as Amazon ECS, Microsoft ACS, Google Container Engine, or orchestration tools such as Kubernetes or Mesos can leverage containerd as their core container runtime. containerd has been designed to be embedded for that purpose.
Q. How did you decided which feature should get into containerd?  How did you came up with the scope of the future containers?
A. We’re trying to capture in containerd the features that any container-centric platform would need, and for which there’s reasonable consensus on the way it should be implemented. Aspects which are either not widely agreed on or that can trivially be built one layer up were left out.
Q. How integrate with CNI and CNM?
A. Phase 3 of the containerd roadmap involves porting the network drivers from libnetwork and finding a good middle ground between the CNM abstraction of libnetwork and the CNI spec.
Additional Resources:

Contribute to containerd
Join the containerd slack channel
Read the engineering team’s blog post.

Docker Extracts & Donates containerd, it&;s Core Container Runtime for the container IndustryClick To Tweet

The post containerd livestream recap appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

DockerCon 2017: Call For Papers FAQ

It’s a new year, and we are looking for new stories of how you are using technology to do big things. Submit your cool hack, use case or deep dive sessions before the 2017 CFP closes on January 14th.

To help with your submissions, we’ve answered the most frequent questions below and put together a list of tips to help get your proposal selected.
Q. How do I submit a proposal?
A. Submit your proposal here.
Q. What kind of talks are you looking for?
A. This year, we are looking for cool hacks, user stories and deep dive submissions:

Cool Hacks: Show us your cool hack and wow us with the interesting ways you can push the boundaries of the Docker stack. You do not have to have your hack ready by the submission deadline, just clearly explain your hack, what makes it cool and the technologies you will use.

Using Docker: Tell us first-hand about your Docker usage, challenges and what you learned along the way and inspire us on how to use Docker to accomplish real tasks.

Deep Dives: Propose code and demo heavy deep-dive sessions on what you have been able to transform with your use of the Docker stack. Entice your audience by going deeply technical and teach them how to do something they haven’t done.

Above all, DockerCon is a user conference and product and vendor pitches are not appropriate.
Q. What will I need to include in my submission?
A. Speaking proposals will ask for:

Title, the more catchy and descriptive, the better. But don&;t be too cute.
Abstract describing the presentation. This is what gets shown in the agenda and how the audience decides if they want to attend your session.
Key Takeaways that communicate your session’s main idea and conclusion. This is your gift to the audience, what will they learn from your session and be able to apply when they get back to work the following week.
Speaker(s): expertise and summary biography
Suggested tags
Past Speaking examples
Recommendations of appropriate audience.

Q. How can I increase the odds of my proposal being selected?
A. Check out the following resources:

Read our tips to help get your proposal selected
See the list of sessions chosen for the 2016 DockerCon and DockerCon EU 2015 programs and read their descriptions
Watch videos from previous DockerCons
See speaker slides from previous DockerCons.

Q. How are submissions selected?
A. After a proposal is submitted, it will be reviewed initially for content and format. Once past the initial review, a committee will read the proposals and vote on best submissions. There are a limited number of speaking slots and we work to achieve a balance of presentations that will interest the Docker community.
Q. How will Speakers be compensated?
A. One speaker for every session will be given a full conference pass. Any additional speakers will be given a pass at the Early Bird rate.
Q. Will there be a Speaker room at the conference?
A. Yes, we will provide a Speaker Ready room for speakers to prepare for presentations, relax and mingle. Speakers should check in with the DockerCon 2017 speaker manager on the day of your talk in the Speaker Room and make sure you are all set for your talk.
Q. What are the important dates to remember?
A.

Call for Proposals Closes &; January 14, 2017 at 11:59 PST
All proposers notified &8211; Late February
Program announced &8211; Late February
Submit your proposal &8211; Today!

DockerCon 2017 CFP is open until Jan 14! Submit your Docker story todayClick To Tweet

The post DockerCon 2017: Call For Papers FAQ appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

New Year’s Resolution: Learn Docker

Remember last year when I said the market for Docker jobs was blowing up? Well, it’s more than doubled in the last year. And Swarm is also rising quickly, growing 12829%, almost all of that in the last year. We expect that with our partnership with Microsoft and Windows Docker containers, that this will grow even faster in the next year as .NET developers start to containerize their applications and Windows IT Professionals start porting their infrastructure to Docker. Take a look at this trendline from indeed.com.

So what are you doing to increase your Docker skills? Want a few suggestions?
Whether you’re a developer or more an ops person, a great place to start is the Docker Labs repository, which has currently 28 labs for you to choose from. They range from beginner tutorials, to orchestration workshops, security and networking tutorials, and guides for using different programming languages and developer tools.
Of course there’s also the Docker Documentation, which has a rich set of resources.
At Dockercon 2017 in April, there will be rich set of material for beginners and experts alike, and you will get to meet people from all over the world who are using Docker in their daily lives. Here are just a few things attendees can do at DockerCon:

Learn about Docker from getting started to deep dives into Docker internals from Docker Captains
Take hands-on, self-paced labs that give you practical skills
Learn about the ecosystem of companies that build on Docker in our Expo Hall.
And if you are really passionate about Docker, our recruiting team will have a booth there too, so check out our careers page

You can also take a training course. We have instructor lead trainings all over the world, or you can do a self-paced course.
Or connect with the Docker Community by attending a Docker Event including meetups and webinars. There’s also a Docker Community list you can join that will give you access to a Docker Slack Channel, where you can go for support and discussion.

Looking for a new job, learning @docker is a good way to get one To Tweet

The post New Year&;s Resolution: Learn Docker appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

Top Docker content of 2016

2016 has been an amazing year for and the container industry. We had 3 major releases of Docker engine this year , and tremendous increase in usage. The community has been following along and contributing amazing Docker resources to help you learn and get hands-on experience. Here’s some of the top read and viewed content for the year:
Releases
Of course releases are always really popular, particularly when they fit requests we had from the community. In particular, we had:

Docker for Mac & Docker for Windows Beta and GA release blog posts, and the video

Docker 1.12 Built-in Orchestration release, and the DockerCon keynote where we announced it

And the release of the Docker for AWS and Azure beta

Windows Containers
When Microsoft made Windows 2016 generally available, people rushed to

Our release blog to read the news
Tutorials to find out how to use Windows containers powered by Docker
The commercial relationship blog post to understand how it all fits together

About Docker
We also provide a lot of information about how to use Docker. In particular, these posts and articles that we shared on social media were the most read:

Containers are Not VMs by Mike Coleman
9 Critical Decisions for Running Docker in Production by James Higginbotham
A Comparative Study of Docker Engine on Windows Server vs. Linux Platform by Docker Captain Ajeet Singh Raina
Our White paper &; The Definitive Guide To Docker

How to Use Docker
Docker has a wide variety of use cases, articles and videos about how to use it are really popular. In particular, when we share content from our users and Docker Captains, they get a lot of views:

Getting started with Docker 1.12 and Raspberry Pi by Docker Captain Alex Ellis
Docker: Making our bioinformatics easier and more reproducible by Jeremy Yoder
NGINX as a Reverse Proxy for Docker by Lorenzo Fontana
5 minute guide for getting Docker 1.12.1 running on your Raspberry Pi 3 by Docker Captain Ajeet Singh Raina
The Docker Cheat Sheet
Docker for Developers

Cgroups, namespaces, and beyond

Still hungry for more info? Here’s some more Docker resources:

Check out Follow all the Captains in one shot with Docker by Docker Captain Alex Ellis
Docker labs and tutorials on GitHub
Follow us on Twitter, Facebook or LinkedIn group
Join the Docker Community Directory and Slack
And of course, keep following this blog for more exciting info

Top Docker content from 2016 &8211; What you docker resources you read the most Click To Tweet

The post Top Docker content of 2016 appeared first on Docker Blog.
Quelle: https://blog.docker.com/feed/

Kubernetes supports OpenAPI

Editor’s note: this post is part of a series of in-depth articles on what’s new in Kubernetes 1.5 OpenAPI allows API providers to define their operations and models, and enables developers to automate their tools and generate their favorite language’s client to talk to that API server. Kubernetes has supported swagger 1.2 (older version of OpenAPI spec) for a while, but the spec was incomplete and invalid, making it hard to generate tools/clients based on it. In Kubernetes 1.4, we introduced alpha support for the OpenAPI spec (formerly known as swagger 2.0 before it was donated to the Open API Initiative) by upgrading the current models and operations. Beginning in Kubernetes 1.5, the support for the OpenAPI spec has been completed by auto-generating the spec directly from Kubernetes source, which will keep the spec–and documentation–completely in sync with future changes in operations/models.The new spec enables us to have better API documentation and we have even introduced a supported python client.The spec is modular, divided by GroupVersion: this is future-proof, since we intend to allow separate GroupVersions to be served out of separate API servers.The structure of spec is explained in detail in OpenAPI spec definition. We used operation’s tags to separate each GroupVersion and filled as much information as we can about paths/operations and models. For a specific operation, all parameters, method of call, and responses are documented. For example, OpenAPI spec for reading a pod information is:{…  “paths”: {“/api/v1/namespaces/{namespace}/pods/{name}”: {    “get”: {     “description”: “read the specified Pod”,     “consumes”: [      “*/*”     ],     “produces”: [      “application/json”,      “application/yaml”,      “application/vnd.kubernetes.protobuf”     ],     “schemes”: [      “https”     ],     “tags”: [      “core_v1″     ],     “operationId”: “readCoreV1NamespacedPod”,     “parameters”: [      {       “uniqueItems”: true,       “type”: “boolean”,       “description”: “Should the export be exact.  Exact export maintains cluster-specific fields like ‘Namespace’.”,       “name”: “exact”,       “in”: “query”      },      {       “uniqueItems”: true,       “type”: “boolean”,       “description”: “Should this value be exported.  Export strips fields that a user can not specify.”,       “name”: “export”,       “in”: “query”      }     ],     “responses”: {      “200”: {       “description”: “OK”,       “schema”: {        “$ref”: “#/definitions/v1.Pod”       }      },      “401”: {       “description”: “Unauthorized”      }     }    },…}…Using this information and the URL of `kube-apiserver`, one should be able to make the call to the given url (/api/v1/namespaces/{namespace}/pods/{name}) with parameters such as `name`, `exact`, `export`, etc. to get pod’s information. Client libraries generators would also use this information to create an API function call for reading pod’s information. For example, python client makes it easy to call this operation like this:from kubernetes import clientret = client.CoreV1Api().read_namespaced_pod(name=”pods_name”, namespace=”default”)A simplified version of generated read_namespaced_pod, can be found here.Swagger-codegen document generator would also be able to create documentation using the same information:GET /api/v1/namespaces/{namespace}/pods/{name}(readCoreV1NamespacedPod)read the specified PodPath parametersname (required)Path Parameter — name of the Podnamespace (required)Path Parameter — object name and auth scope, such as for teams and projectsConsumesThis API call consumes the following media types via the Content-Type request header:*/*Query parameterspretty (optional)Query Parameter — If ‘true’, then the output is pretty printed.exact (optional)Query Parameter — Should the export be exact. Exact export maintains cluster-specific fields like ‘Namespace’.export (optional)Query Parameter — Should this value be exported. Export strips fields that a user can not specify.Return typev1.PodProducesThis API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.application/jsonapplication/yamlapplication/vnd.kubernetes.protobufResponses200OK v1.Pod401UnauthorizedThere are two ways to access OpenAPI spec:From `kuber-apiserver`/swagger.json. This file will have all enabled GroupVersions routes and models and would be most up-to-date file with an specific `kube-apiserver`.From Kubernetes GitHub repository with all core GroupVersions enabled. You can access it on master or an specific release (for example 1.5 release).There are numerous tools that works with this spec. For example, you can use the swagger editor to open the spec file and render documentation, as well as generate clients; or you can directly use swagger codegen to generate documentation and clients. The clients this generates will mostly work out of the box–but you will need some support for authorization and some Kubernetes specific utilities. Use python client as a template to create your own client. If you want to get involved in development of OpenAPI support, client libraries, or report a bug, you can get in touch with developers at SIG-API-Machinery.–Mehdy Bohlool, Software Engineer, GoogleDownload KubernetesGet involved with the Kubernetes project on GitHub Post questions (or answer questions) on Stack Overflow Connect with the community on SlackFollow us on Twitter @Kubernetesio for latest updates
Quelle: kubernetes

Cluster Federation in Kubernetes 1.5

Editor’s note: this post is part of a series of in-depth articles on what’s new in Kubernetes 1.5In the latest Kubernetes 1.5 release, you’ll noticed that support for Cluster Federation is maturing. That functionality was introduced in Kubernetes 1.3, and the 1.5 release includes a number of new features, including an easier setup experience and a step closer to supporting all Kubernetes API objects.A new command line tool called ‘kubefed’ was introduced to make getting started with Cluster Federation much simpler. Also, alpha level support was added for Federated DaemonSets, Deployments and ConfigMaps. In summary:DaemonSets are Kubernetes deployment rules that guarantee that a given pod is always present at every node, as new nodes are added to the cluster (more info).Deployments describe the desired state of Replica Sets (more info). ConfigMaps are variables applied to Replica Sets (which greatly improves image reusability as their parameters can be externalized – more info). Federated DaemonSets, Federated Deployments, Federated ConfigMaps take the qualities of the base concepts to the next level. For instance, Federated DaemonSets guarantee that a pod is deployed on every node of the newly added cluster.But what actually is “federation”? Let’s explain it by what needs it satisfies. Imagine a service that operates globally. Naturally, all its users expect to get the same quality of service, whether they are located in Asia, Europe, or the US. What this means is that the service must respond equally fast to requests at each location. This sounds simple, but there’s lots of logic involved behind the scenes. This is what Kubernetes Cluster Federation aims to do.How does it work? One of the Kubernetes clusters must become a master by running a Federation Control Plane. In practice, this is a controller that monitors the health of other clusters, and provides a single entry point for administration. The entry point behaves like a typical Kubernetes cluster. It allows creating Replica Sets, Deployments, Services, but the federated control plane passes the resources to underlying clusters. This means that if we request the federation control plane to create a Replica Set with 1,000 replicas, it will spread the request across all underlying clusters. If we have 5 clusters, then by default each will get its share of 200 replicas.This on its own is a powerful mechanism. But there’s more. It’s also possible to create a Federated Ingress. Effectively, this is a global application-layer load balancer. Thanks to an understanding of the application layer, it allows load balancing to be “smarter” — for instance, by taking into account the geographical location of clients and servers, and routing the traffic between them in an optimal way.In summary, with Kubernetes Cluster Federation, we can facilitate administration of all the clusters (single access point), but also optimize global content delivery around the globe. In the following sections, we will show how it works.Creating a Federation PlaneIn this exercise, we will federate a few clusters. For convenience, all commands have been grouped into 6 scripts available here:0-settings.sh1-create.sh2-getcredentials.sh3-initfed.sh4-joinfed.sh5-destroy.shFirst we need to define several variables (0-settings.sh)$ cat 0-settings.sh && . 0-settings.sh# this project create 3 clusters in 3 zones. FED_HOST_CLUSTER points to the one, which will be used to deploy federation control planeexport FED_HOST_CLUSTER=us-east1-b# Google Cloud project nameexport FED_PROJECT=<YOUR PROJECT e.g. company-project># DNS suffix for this federation. Federated Service DNS names are published with this suffix. This must be a real domain name that you control and is programmable by one of the DNS providers (Google Cloud DNS or AWS Route53)export FED_DNS_ZONE=<YOUR DNS SUFFIX e.g. example.com>And get kubectl and kubefed binaries. (for installation instructions refer to guides here and here).Now the setup is ready to create a few Google Container Engine (GKE) clusters with gcloud container clusters create (1-create.sh). In this case one is in US, one in Europe and one in Asia.$ cat 1-create.sh && . 1-create.shgcloud container clusters create gce-us-east1-b –project=${FED_PROJECT} –zone=us-east1-b –scopes cloud-platform,storage-ro,logging-write,monitoring-write,service-control,service-management,https://www.googleapis.com/auth/ndev.clouddns.readwritegcloud container clusters create gce-europe-west1-b –project=${FED_PROJECT} –zone=europe-west1-b –scopes cloud-platform,storage-ro,logging-write,monitoring-write,service-control,service-management,https://www.googleapis.com/auth/ndev.clouddns.readwritegcloud container clusters create gce-asia-east1-a –project=${FED_PROJECT} –zone=asia-east1-a –scopes cloud-platform,storage-ro,logging-write,monitoring-write,service-control,service-management,https://www.googleapis.com/auth/ndev.clouddns.readwriteThe next step is fetching kubectl configuration with gcloud -q container clusters get-credentials (2-getcredentials.sh). The configurations will be used to indicate the current context for kubectl commands. $ cat 2-getcredentials.sh && . 2-getcredentials.shgcloud -q container clusters get-credentials gce-us-east1-b –zone=us-east1-b –project=${FED_PROJECT}gcloud -q container clusters get-credentials gce-europe-west1-b –zone=europe-west1-b –project=${FED_PROJECT}gcloud -q container clusters get-credentials gce-asia-east1-a –zone=asia-east1-a –project=${FED_PROJECT}Let’s verify the setup:$ kubectl config get-contextsCURRENT   NAME CLUSTER  AUTHINFO  NAMESPACE*         gke_container-solutions_europe-west1-b_gce-europe-west1-b gke_container-solutions_europe-west1-b_gce-europe-west1-b   gke_container-solutions_europe-west1-b_gce-europe-west1-b      gke_container-solutions_us-east1-b_gce-us-east1-bgke_container-solutions_us-east1-b_gce-us-east1-b           gke_container-solutions_us-east1-b_gce-us-east1-bgke_container-solutions_asia-east1-a_gce-asia-east1-a gke_container-solutions_asia-east1-a_gce-asia-east1-a  gke_container-solutions_asia-east1-a_gce-asia-east1-a We have 3 clusters. One, indicated by the FED_HOST_CLUSTER environment variable, will be used to run the federation plane. For this, we will use the kubefed init federation command (3-initfed.sh).$ cat 3-initfed.sh && . 3-initfed.shkubefed init federation –host-cluster-context=gke_${FED_PROJECT}_${FED_HOST_CLUSTER}_gce-${FED_HOST_CLUSTER} –dns-zone-name=${FED_DNS_ZONE}You will notice that after executing the above command, a new kubectl context has appeared:$ kubectl config get-contextsCURRENT   NAME  CLUSTER  AUTHINFO NAMESPACE…         federation federation The federation context will become our administration entry point. Now it’s time to join clusters (4-joinfed.sh):$ cat 4-joinfed.sh && . 4-joinfed.shkubefed –context=federation join cluster-europe-west1-b –cluster-context=gke_${FED_PROJECT}_europe-west1-b_gce-europe-west1-b –host-cluster-context=gke_${FED_PROJECT}_${FED_HOST_CLUSTER}_gce-${FED_HOST_CLUSTER}kubefed –context=federation join cluster-asia-east1-a –cluster-context=gke_${FED_PROJECT}_asia-east1-a_gce-asia-east1-a –host-cluster-context=gke_${FED_PROJECT}_${FED_HOST_CLUSTER}_gce-${FED_HOST_CLUSTER}kubefed –context=federation join cluster-us-east1-b –cluster-context=gke_${FED_PROJECT}_us-east1-b_gce-us-east1-b –host-cluster-context=gke_${FED_PROJECT}_${FED_HOST_CLUSTER}_gce-${FED_HOST_CLUSTER}Note that cluster gce-us-east1-b is used here to run the federation control plane and also to work as a worker cluster. This circular dependency helps to use resources more efficiently and it can be verified by using the kubectl –context=federation get clusters command:$ kubectl –context=federation get clustersNAME                        STATUS    AGEcluster-asia-east1-a        Ready     7scluster-europe-west1-b      Ready     10scluster-us-east1-b          Ready     10sWe are good to go.Using Federation To Run An ApplicationIn our repository you will find instructions on how to build a docker image with a web service that displays the container’s hostname and the Google Cloud Platform (GCP) zone.An example output might look like this:{“hostname”:”k8shserver-6we2u”,”zone”:”europe-west1-b”}Now we will deploy the Replica Set (k8shserver.yaml):$ kubectl –context=federation create -f rs/k8shserverAnd a Federated Service (k8shserver.yaml):$ kubectl –context=federation create -f service/k8shserverAs you can see, the two commands refer to the “federation” context, i.e. to the federation control plane. After a few minutes, you will realize that underlying clusters run the Replica Set and the Service.Creating The IngressAfter the Service is ready, we can create Ingress – the global load balancer. The command is like this:kubectl –context=federation create -f ingress/k8shserver.yamlThe contents of the file point to the service we created in the previous step:apiVersion: extensions/v1beta1kind: Ingressmetadata:  name: k8shserverspec:  backend:    serviceName: k8shserver    servicePort: 80After a few minutes, we should get a global IP address:$ kubectl –context=federation get ingressNAME         HOSTS     ADDRESS          PORTS     AGEk8shserver   *         130.211.40.125   80        20mEffectively, the response of:$ curl 130.211.40.125depends on the location of client. Something like this would be expected in the US:{“hostname”:”k8shserver-w56n4″,”zone”:”us-east1-b”}Whereas in Europe, we might have:{“hostname”:”k8shserver-z31p1″,”zone”:”eu-west1-b”}Please refer to this issue for additional details on how everything we’ve described works.DemoSummaryCluster Federation is actively being worked on and not fully General Availability. Some APIs are in beta and others are in alpha. Some features are missing, for instance cross-cloud load balancing is not supported (federated ingress currently only works on Google Cloud Platform as it depends on GCP HTTP(S) Load Balancing.Nevertheless, as the functionality matures, it will become an enabler for all companies that aim at global markets, but currently cannot afford sophisticated administration techniques as used by the likes of Netflix or Amazon. That’s why we closely watch the technology, hoping that it soon fulfills its promise.PS. When done, remember to destroy your clusters:$ . 5-destroy.sh–Lukasz Guminski, Software Engineer at Container Solutions. Allan Naim, Product Manager and Madhu C.S., Software Engineer, Google
Quelle: kubernetes

Windows Server Support Comes to Kubernetes

Editor’s note: this post is part of a series of in-depth articles on what’s new in Kubernetes 1.5Extending on the theme of giving users choice, Kubernetes 1.5 release includes the support for Windows Servers. WIth more than 80% of enterprise apps running Java on Linux or .Net on Windows, Kubernetes is previewing capabilities that extends its reach to the mass majority of enterprise workloads. The new Kubernetes Windows Server 2016 and Windows Container support includes public preview with the following features:Containerized Multiplatform Applications – Applications developed in operating system neutral languages like Go and .NET Core were previously impossible to orchestrate between Linux and Windows. Now, with support for Windows Server 2016 in Kubernetes, such applications can be deployed on both Windows Server as well as Linux, giving the developer choice of the operating system runtime. This capability has been desired by customers for almost two decades. Support for Both Windows Server Containers and Hyper-V Containers – There are two types of containers in Windows Server 2016. Windows Containers is similar to Docker containers on Linux, and uses kernel sharing. The other, called Hyper-V Containers, is more lightweight than a virtual machine while at the same time offering greater isolation, its own copy of the kernel, and direct memory assignment. Kubernetes can orchestrate both these types of containers. Expanded Ecosystem of Applications – One of the key drivers of introducing Windows Server support in Kubernetes is to expand the ecosystem of applications supported by Kubernetes: IIS, .NET, Windows Services, ASP.NET, .NET Core, are some of the application types that can now be orchestrated by Kubernetes, running inside a container on Windows Server.Coverage for Heterogeneous Data Centers – Organizations already use Kubernetes to host tens of thousands of application instances across Global 2000 and Fortune 500. This will allow them to expand Kubernetes to the large footprint of Windows Server. The process to bring Windows Server to Kubernetes has been a truly multi-vendor effort and championed by the Windows Special Interest Group (SIG) – Apprenda, Google, Red Hat and Microsoft were all involved in bringing Kubernetes to Windows Server. On the community effort to bring Kubernetes to Windows Server, Taylor Brown, Principal Program Manager at Microsoft stated that “This new Kubernetes community work furthers Windows Server container support options for popular orchestrators, reinforcing Microsoft’s commitment to choice and flexibility for both Windows and Linux ecosystems.”Guidance for Current UsageWhere to use Windows Server support?Right now organizations should start testing Kubernetes on Windows Server and provide feedback. Most organizations take months to set up hardened production environments and general availability should be available in next few releases of Kubernetes. What works?Most of the Kubernetes constructs, such as Pods, Services, Labels, etc. work with Windows Containers.What doesn’t work yet?Pod abstraction is not same due to networking namespaces. Net result is that Windows containers in a single POD cannot communicate over localhost. Linux containers can share networking stack by placing them in the same network namespace.DNS capabilities are not fully implementedUDP is not supported inside a containerWhen will it be ready for all production workloads (general availability)?The goal is to refine the networking and other areas that need work to get Kubernetes users a production version of Windows Server 2016 – including with Windows Nano Server and Windows Server Core installation options – support in the next couple releases. Technical DemoKubernetes on Windows Server 2016 ArchitectureRoadmapSupport for Windows Server-based containers is in alpha release mode for Kubernetes 1.5, but the community is not stopping there. Customers want enterprise hardened container scheduling and management for their entire tech portfolio. That has to include full parity of features among Linux and Windows Server in production. The Windows Server SIG will deliver that parity within the next one or two releases of Kubernetes through a few key areas of investment:Networking – the SIG will continue working side by side with Microsoft to enhance the networking backbone of Windows Server Containers, specifically around lighting up container mode networking and native network overlay support for container endpoints. OOBE – Improving the setup, deployment, and diagnostics for a Windows Server node, including the ability to deploy to any cloud (Azure, AWS, GCP)Runtime Operations – the SIG will play a key part in defining the monitoring interface of the Container Runtime Interface (CRI), leveraging it to provide deep insight and monitoring for Windows Server-based containersGet StartedTo get started with Kubernetes on Windows Server 2016, please visit the GitHub guide for more details. If you want to help with Windows Server support, then please connect with the Windows Server SIG or connect directly with Michael Michael, the SIG lead, on GitHub. –Michael Michael, Senior Director of Product Management, Apprenda 
Quelle: kubernetes

StatefulSet: Run and Scale Stateful Applications Easily in Kubernetes

Editor’s note: this post is part of a series of in-depth articles on what’s new in Kubernetes 1.5In the latest release, Kubernetes 1.5, we’ve moved the feature formerly known as PetSet into beta as StatefulSet. There were no major changes to the API Object, other than the community selected name, but we added the semantics of “at most one pod per index” for deployment of the Pods in the set. Along with ordered deployment, ordered termination, unique network names, and persistent stable storage, we think we have the right primitives to support many containerized stateful workloads. We don’t claim that the feature is 100% complete (it is software after all), but we believe that it is useful in its current form, and that we can extend the API in a backwards-compatible way as we progress toward an eventual GA release.When is StatefulSet the Right Choice for my Storage Application?Deployments and ReplicaSets are a great way to run stateless replicas of an application on Kubernetes, but their semantics aren’t really right for deploying stateful applications. The purpose of StatefulSet is to provide a controller with the correct semantics for deploying a wide range of stateful workloads. However, moving your storage application onto Kubernetes isn’t always the correct choice. Before you go all in on converging your storage tier and your orchestration framework, you should ask yourself a few questions.Can your application run using remote storage or does it require local storage media?Currently, we recommend using StatefulSets with remote storage. Therefore, you must be ready to tolerate the performance implications of network attached storage. Even with storage optimized instances, you won’t likely realize the same performance as locally attached, solid state storage media. Does the performance of network attached storage, on your cloud, allow your storage application to meet its SLAs? If so, running your application in a StatefulSet provides compelling benefits from the perspective of automation. If the node on which your storage application is running fails, the Pod containing the application can be rescheduled onto another node, and, as it’s using network attached storage media, its data are still available after it’s rescheduled.Do you need to scale your storage application?What is the benefit you hope to gain by running your application in a StatefulSet? Do you have a single instance of your storage application for your entire organization? Is scaling your storage application a problem that you actually have? If you have a few instances of your storage application, and they are successfully meeting the demands of your organization, and those demands are not rapidly increasing, you’re already at a local optimum. If, however, you have an ecosystem of microservices, or if you frequently stamp out new service footprints that include storage applications, then you might benefit from automation and consolidation.  If you’re already using Kubernetes to manage the stateless tiers of your ecosystem, you should consider using the same infrastructure to manage your storage applications.How important is predictable performance?Kubernetes doesn’t yet support isolation for network or storage I/O across containers. Colocating your storage application with a noisy neighbor can reduce the QPS that your application can handle. You can mitigate this by scheduling the Pod containing your storage application as the only tenant on a node (thus providing it a dedicated machine) or by using Pod anti-affinity rules to segregate Pods that contend for network or disk, but this means that you have to actively identify and mitigate hot spots.If squeezing the absolute maximum QPS out of your storage application isn’t your primary concern, if you’re willing and able to mitigate hotspots to ensure your storage applications meet their SLAs, and if the ease of turning up new “footprints” (services or collections of services), scaling them, and flexibly re-allocating resources is your primary concern, Kubernetes and StatefulSet might be the right solution to address it.Does your application require specialized hardware or instance types?If you run your storage application on high-end hardware or extra-large instance sizes, and your other workloads on commodity hardware or smaller, less expensive images, you may not want to deploy a heterogenous cluster. If you can standardize on a single instance size for all types of apps, then you may benefit from the flexible resource reallocation and consolidation, that you get from Kubernetes.A Practical Example – ZooKeeperZooKeeper is an interesting use case for StatefulSet for two reasons. First, it demonstrates that StatefulSet can be used to run a distributed, strongly consistent storage application on Kubernetes. Second, it’s a prerequisite for running workloads like Apache Hadoop and Apache Kakfa on Kubernetes. An in-depth tutorial on deploying a ZooKeeper ensemble on Kubernetes is available in the Kubernetes documentation, and we’ll outline a few of the key features below.Creating a ZooKeeper EnsembleCreating an ensemble is as simple as using kubectl create to generate the objects stored in the manifest.$ kubectl create -f http://k8s.io/docs/tutorials/stateful-application/zookeeper.yamlservice “zk-headless” createdconfigmap “zk-config” createdpoddisruptionbudget “zk-budget” createdstatefulset “zk” createdWhen you create the manifest, the StatefulSet controller creates each Pod, with respect to its ordinal, and waits for each to be Running and Ready prior to creating its successor.$ kubectl get -w -l app=zkNAME      READY     STATUS    RESTARTS   AGEzk-0      0/1       Pending   0          0szk-0      0/1       Pending   0         0szk-0      0/1       Pending   0         7szk-0      0/1       ContainerCreating   0         7szk-0      0/1       Running   0         38szk-0      1/1       Running   0         58szk-1      0/1       Pending   0         1szk-1      0/1       Pending   0         1szk-1      0/1       ContainerCreating   0         1szk-1      0/1       Running   0         33szk-1      1/1       Running   0         51szk-2      0/1       Pending   0         0szk-2      0/1       Pending   0         0szk-2      0/1       ContainerCreating   0         0szk-2      0/1       Running   0         25szk-2      1/1       Running   0         40sExamining the hostnames of each Pod in the StatefulSet, you can see that the Pods’ hostnames also contain the Pods’ ordinals.$ for i in 0 1 2; do kubectl exec zk-$i — hostname; donezk-0zk-1zk-2ZooKeeper stores the unique identifier of each server in a file called “myid”. The identifiers used for ZooKeeper servers are just natural numbers. For the servers in the ensemble, the “myid” files are populated by adding one to the ordinal extracted from the Pods’ hostnames.$ for i in 0 1 2; do echo “myid zk-$i”;kubectl exec zk-$i — cat /var/lib/zookeeper/data/myid; donemyid zk-01myid zk-12myid zk-23Each Pod has a unique network address based on its hostname and the network domain controlled by the zk-headless Headless Service.$  for i in 0 1 2; do kubectl exec zk-$i — hostname -f; donezk-0.zk-headless.default.svc.cluster.localzk-1.zk-headless.default.svc.cluster.localzk-2.zk-headless.default.svc.cluster.localThe combination of a unique Pod ordinal and a unique network address allows you to populate the ZooKeeper servers’ configuration files with a consistent ensemble membership.$  kubectl exec zk-0 — cat /opt/zookeeper/conf/zoo.cfgclientPort=2181dataDir=/var/lib/zookeeper/datadataLogDir=/var/lib/zookeeper/logtickTime=2000initLimit=10syncLimit=2000maxClientCnxns=60minSessionTimeout= 4000maxSessionTimeout= 40000autopurge.snapRetainCount=3autopurge.purgeInteval=1server.1=zk-0.zk-headless.default.svc.cluster.local:2888:3888server.2=zk-1.zk-headless.default.svc.cluster.local:2888:3888server.3=zk-2.zk-headless.default.svc.cluster.local:2888:3888StatefulSet lets you deploy ZooKeeper in a consistent and reproducible way. You won’t create more than one server with the same id, the servers can find each other via a stable network addresses, and they can perform leader election and replicate writes because the ensemble has consistent membership.The simplest way to verify that the ensemble works is to write a value to one server and to read it from another. You can use the “zkCli.sh” script that ships with the ZooKeeper distribution, to create a ZNode containing some data.$  kubectl exec zk-0 zkCli.sh create /hello world…WATCHER::WatchedEvent state:SyncConnected type:None path:nullCreated /helloYou can use the same script to read the data from another server in the ensemble.$  kubectl exec zk-1 zkCli.sh get /hello …WATCHER::WatchedEvent state:SyncConnected type:None path:nullworld…You can take the ensemble down by deleting the zk StatefulSet.$  kubectl delete statefulset zkstatefulset “zk” deletedThe cascading delete destroys each Pod in the StatefulSet, with respect to the reverse order of the Pods’ ordinals, and it waits for each to terminate completely before terminating its predecessor.$  kubectl get pods -w -l app=zkNAME      READY     STATUS    RESTARTS   AGEzk-0      1/1       Running   0          14mzk-1      1/1       Running   0          13mzk-2      1/1       Running   0          12mNAME      READY     STATUS        RESTARTS   AGEzk-2      1/1       Terminating   0          12mzk-1      1/1       Terminating   0         13mzk-0      1/1       Terminating   0         14mzk-2      0/1       Terminating   0         13mzk-2      0/1       Terminating   0         13mzk-2      0/1       Terminating   0         13mzk-1      0/1       Terminating   0         14mzk-1      0/1       Terminating   0         14mzk-1      0/1       Terminating   0         14mzk-0      0/1       Terminating   0         15mzk-0      0/1       Terminating   0         15mzk-0      0/1       Terminating   0         15mYou can use kubectl apply to recreate the zk StatefulSet and redeploy the ensemble.$  kubectl apply -f http://k8s.io/docs/tutorials/stateful-application/zookeeper.yamlservice “zk-headless” configuredconfigmap “zk-config” configuredstatefulset “zk” createdIf you use the “zkCli.sh” script to get the value entered prior to deleting the StatefulSet, you will find that the ensemble still serves the data.$  kubectl exec zk-2 zkCli.sh get /hello …WATCHER::WatchedEvent state:SyncConnected type:None path:nullworld…StatefulSet ensures that, even if all Pods in the StatefulSet are destroyed, when they are rescheduled, the ZooKeeper ensemble can elect a new leader and continue to serve requests.Tolerating Node FailuresZooKeeper replicates its state machine to different servers in the ensemble for the explicit purpose of tolerating node failure. By default, the Kubernetes Scheduler could deploy more than one Pod in the zk StatefulSet to the same node. If the zk-0 and zk-1 Pods were deployed on the same node, and that node failed, the ZooKeeper ensemble couldn’t form a quorum to commit writes, and the ZooKeeper service would experience an outage until one of the Pods could be rescheduled.You should always provision headroom capacity for critical processes in your cluster, and if you do, in this instance, the Kubernetes Scheduler will reschedule the Pods on another node and the outage will be brief.If the SLAs for your service preclude even brief outages due to a single node failure, you should use a PodAntiAffinity annotation. The manifest used to create the ensemble contains such an annotation, and it tells the Kubernetes Scheduler to not place more than one Pod from the zk StatefulSet on the same node.Tolerating Planned MaintenanceThe manifest used to create the ZooKeeper ensemble also creates a PodDistruptionBudget, zk-budget. The zk-budget informs Kubernetes about the upper limit of disruptions (unhealthy Pods) that the service can tolerate. {              “podAntiAffinity”: {                “requiredDuringSchedulingRequiredDuringExecution”: [{                  “labelSelector”: {                    “matchExpressions”: [{                      “key”: “app”,                      “operator”: “In”,                      “values”: [“zk-headless”]                    }]                  },                  “topologyKey”: “kubernetes.io/hostname”                }]              }            }}$ kubectl get poddisruptionbudget zk-budgetNAME        MIN-AVAILABLE   ALLOWED-DISRUPTIONS   AGEzk-budget   2               1                     2hzk-budget indicates that at least two members of the ensemble must be available at all times for the ensemble to be healthy. If you attempt to drain a node prior taking it offline, and if draining it would terminate a Pod that violates the budget, the drain operation will fail. If you use kubectl drain, in conjunction with PodDisruptionBudgets, to cordon your nodes and to evict all Pods prior to maintenance or decommissioning, you can ensure that the procedure won’t be disruptive to your stateful applications.Looking ForwardAs the Kubernetes development looks towards GA, we are looking at a long list of suggestions from users. If you want to dive into our backlog, checkout the GitHub issues with the stateful label. However, as the resulting API would be hard to comprehend, we don’t expect to implement all of these feature requests. Some feature requests, like support for rolling updates, better integration with node upgrades, and using fast local storage, would benefit most types of stateful applications, and we expect to prioritize these. The intention of StatefulSet is to be able to run a large number of applications well, and not to be able to run all applications perfectly. With this in mind, we avoided implementing StatefulSets in a way that relied on hidden mechanisms or inaccessible features. Anyone can write a controller that works similarly to StatefulSets. We call this “making it forkable.”  Over the next year, we expect many popular storage applications to each have their own community-supported, dedicated controllers or “operators”. We’ve already heard of work on custom controllers for etcd, Redis, and ZooKeeper. We expect to write some more ourselves and to support the community in developing others.   The Operators for etcd and Prometheus from CoreOS, demonstrate an approach to running stateful applications on Kubernetes that provides a level of automation and integration beyond that which is possible with StatefulSet alone. On the other hand, using a generic controller like StatefulSet or Deployment means that a wide range of applications can be managed by understanding a single config object. We think Kubernetes users will appreciate having the choice of these two approaches.–Kenneth Owens & Eric Tune, Software Engineers, GoogleDownload KubernetesGet involved with the Kubernetes project on GitHub Post questions (or answer questions) on Stack Overflow Connect with the community on SlackFollow us on Twitter @Kubernetesio for latest updates
Quelle: kubernetes

Five Days of Kubernetes 1.5

With the help of our growing community of 1,000 contributors, we pushed some 5,000 commits to extend support for production workloads and deliver Kubernetes 1.5. While many improvements and new features have been added, we selected few to highlight in a series of in-depths posts listed below. This progress is our commitment in continuing to make Kubernetes best way to manage your production workloads at scale. Day 1* Introducing Container Runtime Interface (CRI) in KubernetesDay 2* …Day 3* …Day 4* …Day 5* …ConnectDownload KubernetesGet involved with the Kubernetes project on GitHub Post questions (or answer questions) on Stack Overflow Connect with the community on SlackFollow us on Twitter @Kubernetesio for latest updates
Quelle: kubernetes