Wednesday, August 9, 2017

Cloud Foundry and Kubernetes for Beginners

Cloud Foundry and Kubernetes are probably the most prominent technologies for cloud infrastructure development, they have a very different set of goals and as such they follow significantly different solution design approaches.

Cloud Foundry is a traditional Platform-as-a-Service technology, with a specific design orientation towards enterprise-scale resources and privileges management. It follows a top-down approach, where your primary component is a CF "cloud" instance. Within a CF cloud you create organizations and spaces, which are bound to resource quota plans. Quota plans include both computing (CPU/RAM/instances) resources and external services resources (e.g. database storage).

CF users are assigned to organizations and can deploy/monitor their applications based on their roles. There is a list of CF supported development languages/frameworks, called buildpacks . Developers/release managers can deploy and monitor their applications using the Cloud Foundry command line client. CF application instances run on Linux containers, on a CF platform you get the same level of scalability/isolation that you can find on most containerized application platforms.

CF does a clear distinction between applications and services, on CF parlance, a service is an abstract resource that can be instantiated and bound to applications. Services are available from a CF's service catalog «named marketplace per it's usual format on public clouds», example of CF services are object storage, SQL dbs, nonsql, bigdata / deep learning APIs, messaging, etc.

There are many CF powered PaaS providers, as an IBMer I am more familiar with IBM's offering, BlueMix . Bluemix provides a very large and diverse catalog of services, some which rely on IBM exclusive technology. In any case, Cloud Foundry is an open source project, which means you can deploy your own CF instance, exploring your existing infrastructure and adapting services per your requirements.

Kubernetes is an application container orchestration technology, with a specific design orientation towards application containers management and integration. It follows a bottom-up approach, where your primary component is the "pod", a "pod" is a group of one or more containers that can be deployed into a Kubernetes cluster. Pod's are most commonly composed using Docker images. There is no default organization structure in a Kubernetes cluster, in order to achieve resource control on an organization level you will need to setup Kubernetes namespaces with resource quotas and roles.

Developers/release managers (which can have namespaces bound roles) can deploy/monitor their container images. There is no Kubernetes specific list of images for application language/frameworks support, you will need to select/deploy/compose the pod with images bundling the required base O.S. image, SDK and applications.

Kubernetes does not have an explicit distinction between applications and services, a Kubernetes pod can be either an application fronted (e.g. nodejs) or a back-end (e.g. postgresql), or both. A Kubernetes service is as network level of abstraction, used to define a TCP service from the container that should be exposed externally.

There are many Kubernetes distributions and services providers, and there are also several PaaS solutions (e.g. RedHat's OpenShift) built on top of Kubernetes. IBM is also on the Kubernetes train on it's cloud platform. Kubernetes clusters are available as a CF service on BlueMix . Kubernetes is also an Open Source project, you can try it or build your own infrastructure.

Cloud Foundry is a platform-as-a-service platform, with an explicit organization structure and resource management control system, CF provides officially supported SDKs, services are available as a different level of abstraction, services instances can be created and bound to applications. CF application instances are run within a self-healing elastic containerized platform.

Kubernetes is container-orchestration platform, capable of running services on container based images (most commonly Docker). It provides the freedom and responsibility for running a wide range of components and services that are bundled into images. It provides optional resource control facilities. Kubernetes is a self-healing elastic containerized platform.

The best option between a CF app or a Kubernetes pod will depend a lot on the application requirements, team size, skills and other business requirements.

No comments:

Post a Comment