Kubernetes and Docker Mini-Bootcamp Q&A

Last week Reza Roodsari, one of our instructors here at Mirantis Training, delivered a webinar that served as a Kubernetes Mini Bootcamp. We didn’t have time to answer all the questions during the webinar, so here are the answers.
Docker and Kubernetes technology questions
Q: Is persistent storage available for containers?
A: Yes, you can create persistent volumes on which to store files.
Q: Are there practical examples of container usage in embedded products?
A: We’re not familiar with any particular examples, but apparently there’s an entire open source project devoted to it: https://resinos.io/.
Q: Could you repeat why configuration management is not needed?
A: When using Docker, with or without Kubernetes, you don’t necessarioly need configuration management because the developer can build those functions into the Dockerfile. That’s not to say that you can’t combine the two approaches, of course, but much of what you’d normally do with Puppet, Chef, or Salt can also be done in the Dockerfile.
Q: Why containers are still deployed on VMs?
A: Containers don’t have to be deployed on VMs; they can be deployed directly on bare metal. They’re often deployed on VMs because that’s how today’s devops operates, as a rule. What’s more, most of today’s IaaS is based on VMs, so when developers need resources on which to deploy their containers, that’s what they get.
Q: What are Pods?
A: A Pod is the smallest unit that Kubernetes recognizes. It consists of one or more containers managed as a single unit. Basically, a Pod is a single microservice.
Q: Can you provide a brief explanation of how Swarm and K8s are similar and impact of competing standards in OpenStack?
A: Both Docker Swarm and Kubernetes orchestrate containers, but in different ways. As far as the impact of competing standards in OpenStack, we could try to look in our crystal ball, but only time will tell. The good thing about open source in general, and OpenStack in particular, is that if supporting a particular standard is important to you, there’s nothing stopping you from making it happen.
Q: How does Dockers handle it if a Pod crashes?
A: Docker doesn’t recognize pods; they are a Kubernetes construct. If Kubernetes sees that a Pod has crashed, it starts another to replace it.
Q: How do you upgrade pods?
A: Pods are defined through a YAML file, which specifies the images to be used, number of containers, any volumes or networks, and so on. To upgrade a Pod, you update the YAML file and instruct Kubernetes to apply the new file. You can also roll back changes if necessary.
Q: What is Kubernetes Swarmers?
A: I’m assuming you mean Docker Swarm. It’s Docker’s version of a container orchestration system like Kubernetes.
Q: Are Docker and K8s stable enough to run application in the productions?
A: Yes, they are both stable enough to run production applications, and in fact both are used in production situations in various places.
Q: Is the k8s cloud running as a separate cluster than the OpenStack cluster in the first example?
A: Yes, in the “Best of Breed” example, there are two separate clusters; “pets” are running in OpenStack, and “cattle” are running in Kubernetes. That said, there’s nothing to say that the Kubernetes cluster can’t be running within the OpenStack cluster.
Q: I heard Mirantis OpenStack 10 will be based on Kubernetes, can you comment on it?
A: This isn’t one of the examples we covered, but yes, that’s the plan. Kubernetes orchestrates applications; OpenStack is an application. We plan to enable Kubernetes to orchestrate the OpenStack control plane.
Q: Does Kubernetes use Docker containers?
A: Yes, but it can also use other types of containers. It already supports Rkt, and can be extended to support others. With the use of the runc/libcontainer, it can use any container.
Q: Is docker + Kubernetes only for Linux environments ?
A: No, both Docker has supported Windows for some time, and as of version 1.5, Kubernetes supports Windows Server Containers, with the controller running on Linux and kubelet and kubeproxy running on Windows.
Q: What are the issues with the new v1.5 K8s release on Windows, such as some issue with IP tables and PODS only supporting a single container?
A: Yes, because Windows doesn’t use IPtables like Linux does, there are some limitations on networking in Windows Server Containers. Similarly, because of the way Windows handles namespaces, a Pod using Windows Server Containers can only have a single container. Microsoft is working with the Kubernetes community to overcome these limitations in future versions.
Q: In what direction are Kubernetes and OpenStack are going? Are they are diverging a lot?
A: Kubernetes and OpenStack are completely different things; they don’t really have to diverge because they were never together in the first place. You can run Kubernetes on OpenStack, and you can orchestrate OpenStack with Kubernetes, but they’re still two different things.
Q: How do you monitor applications deployed on Docker containers?
A: Kubernetes can do healthchecks for a pod with the livenessProbe attribute.
Q: How do you access one application with many Docker instances running from the external world?
A: You have multiple options for accessing multiple instances of a Docker application running in Kubernetes by using the Kubernetes Service resource. You can create a Service using a public IP, a loadbalancer Service, or, in case of HTTP, a Kubernetes Ingress resource.
Q: Does Mirantis provide support for Kubernetes?
A: Right now, Mirantis products are limited to OpenStack, so that’s what we support; when we add Kubernetes to the mix, that will change to some extent, but for the moment, that’s the situation.
Q: How do you assign a public IP to a Docker container running inside OpenStack VM?
A: You do it just as you assign any other OpenStack-based public IPs, using floating IPs.
Q: Can I say Kubernetes is like a flow chart ? A sequence of actions one after the other?
A: Ideally, that would be true, but actually it’s not — directly, anyway. When you have a YAML file that includes multiple definitions, there’s no guarantee that they will be executed in any particular order. To solve that problem and create the “flow chart” effect, you can look into the new Kubernetes AppController.
Q: Can you use Docker/Kubernetes on Windows services or real world applications, databases and storage or do you create windows VMs and run them below Kubernetes?
A: It sounds like when you say “real world applications” what you’re really saying is “pets”. If so, it’s best to create them using VMs.
Q: How does the decoupling happen between the application and the runtime platform ?
A: Containers are designed to be self-contained. So you might create a container that includes everything down to the operating system, making it reasonably portable. We should note that the application isn’t COMPLETELY decoupled from the runtime platform. For example, if you have an application written in Mono (the Linux version of .NET), you can use Linux Kubernetes to run it, but a straight Windows Server Container will only run in Windows Kubernetes.
Q: What is a good way of learning YAML? Because it is kind of very important for Docker Compose & Kubernetes & many other application coming up in SDN field.
A: We’ll be posting a YAML tutorial shortly; let us know in the comments if you’d like to be notified when it’s ready.
Q: Though containers are layered, a layer duplicates the host OS. What lightweight container host VM is available in OpenStack?
A: Rather than worrying about a lightweight container host VM image, you might consider using a minimal OS for your base container layer, such as Alpine Linux.
Q: Docker support in Windows Server: are you seeing any traction on Kubernetes+Docker in Windows environments?
A: It’s still pretty early to tell, but Microsoft is making a commitment to making sure that Kubernetes in Windows reaches parity with Linux.
Q: is it possible to run OpenClos in a pod/container?
A: We haven’t done it, but it appears that work has been done to make it available in Docker (https://github.com/Juniper/OpenClos) and if it’s available in a Docker container, you can run it in Kubernetes.
Q: Do you have any recommendations on the use of Stackenetes?
A: Stackanetes is a CoreOs project that does an opinionated installation OpenStack controller and compute nodes on a Kubernetes cluster. We don’t have any recommendation on its use.
Training logistics questions
Q: In what locations/countries do you hold classes?
A: We hold live trainings in the United States and in multiple countries in Europe. We are also beginning to offer live trainings in Asia-Pacific. We also hold virtual trainings in Pacific, Central US, and EMEA time, though you don’t have to be in those regions to participate (as long as you’re willing to be up at odd hours).
Q: On your website there is virtual and online training. What is the difference?
A: Virtual training is a live, instructor-led class, with video of the classroom and the instructor leading you through the labs. Online training is self-paced, and you work on your own schedule.
Q: What do I get with the self-paced class?
A: The self-paced class includes one-year of access to course materials and videos, 72 hours of online hands-on labs, a discussion board connecting students to the instructor and peers, and a completion certificate upon completing the class.
Q: What are the requirements to take the Kubernetes exam?
A: To take the Kubernetes certification exam, you should either take the KD100 Bootcamp class or have equivalent experience. You can see what the exam covers here.
Q: Any Instructor-led training in Asia Pacific?
A: Yes, we just scheduled the OS250 class on Feb 6 in Bangalore, and more classes are coming in the first quarter of 2017. You can get information on the Bangalore class here.
Q: Is the KDC100 course geared for the entry level or more advanced technical user? What are the prerequisites to attend?
A: The KD100 Course is mostly for container novices. You can see the prerequisites and outcomes here.