Network Booting Kubernetes

7

Click here to load reader

Transcript of Network Booting Kubernetes

Page 1: Network Booting Kubernetes

Network Booting KubernetesA Path to Conformance on Local Hardware

Cameron [email protected] on Kubernetes Slack

1

Page 2: Network Booting Kubernetes

The problem: I know how to use kube-up.sh to create environments in the cloud and on my laptop but how do I deploy Kubernetes on a cluster of physical machines?

Lots of decisions§  What base Operating System?§  How is the Operating System deployed and configured?§  How is Kubernetes and etcd installed and configured?§  How do I get to a conformant Kubernetes cluster?

2

Kubernetes on Local Hardware

Page 3: Network Booting Kubernetes

Fortunately there are a lot of tools out there that can help address many of the questions:

§  Immutable Operating Systems§  Proven deployment technologies such as PXE Network booting§  Fantastic boot time configuration utilities such as cloud-init

3

Solution

Page 4: Network Booting Kubernetes

Treat your hardware like cattle!

§  Always network boot your hardware allowing for easy provisioning§  Dynamic generation of PXE configuration based on desired state of a

given box§  Install an immutable Operating System

§  Leads to a consistent set of deployed software§  Host the images locally

§  Pass all post-installation configuration through cloud-init§  Configuration is centrally controlled and can be changed easily for all

machines§  Use systemd unit files to apply configuration and drive processes

4

Putting it Together

Page 5: Network Booting Kubernetes

§  We chose Atomic OS as our operating system§  Built tools for building local containerized repo servers§  Use the default Fedora Docker and Kubernetes RPMs§  Use anaconda for Docker friendly disk partitioning, default user creation

and cloud-init bootloader configuration§  PXE Boot using PXELINUX from the SYSLINUX project and xinetd

TFTP server§  May use iPXE and HTTP in the future

§  Our cloud-init files drive all configuration§  Service enablement§  SSH Keys§  Flannel and etcd configuration§  Kubernetes configuration§  Certificate enrollment

5

Our Experience Reaching Conformance

Page 6: Network Booting Kubernetes

6

Bundled into a Containerized Solution

Page 7: Network Booting Kubernetes