Fusion File Share by Tuxera is an SMB solution that emphasizes high reliability, scalability, and performance. One of the benefits of Fusion is that it features support for Kubernetes storage (something I’ve talked about before) through Container Storage Interface (CSI). What is CSI and Kubernetes, and how can they be used through Fusion File Share? Let’s examine these topics more in detail.

Delving into Kubernetes

The name Kubernetes originates from Greek, meaning helmsman or pilot. Kubernetes itself is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available. Google open-sourced the Kubernetes project in 2014. The platform combines over 15 years of Google’s experience running production workloads at scale with best-of-breed ideas and practices from the community.

A recent survey by StackRox shows that Kubernetes adoption stands at 86% in the container orchestration market, and now the competition has shifted among cloud vendors who provide Kubernetes. Some of the salient features of Kubernetes that have made it popular include:

(a) Portability – Kubernetes offers portability, as well as faster, simpler deployment times. This means that companies can take advantage of multiple cloud providers if needed, and can grow rapidly without having to re-architect their infrastructure.

(b) Scalability – Kubernetes has an ability to run containers on one or more public cloud environments, in virtual machines, or on bare metal. This means that it can be deployed almost anywhere.

(c) High availability (HA) – Kubernetes addresses high availability at both the application and the infrastructure level. Adding a reliable storage layer to Kubernetes ensures that stateful workloads are highly available. It also ensures that Kubernetes components can be configured for multi-node replication (multi-master).

(d) Open source (OSS) – Since Kubernetes is open source, you can take advantage of the vast ecosystem of other open source tools designed specifically to work with Kubernetes without the lock-in of a closed/proprietary system.

(e) Huge ecosystem – With thousands of developers all over the world, as well as tools with 5,608 GitHub repositories (and counting), you won’t be forging ahead into new territory without help.

(f) Market leader – Kubernetes was developed, used, and maintained by Google. This not only gives it instant credibility, but it also means you can trust that bugs will be fixed and that new features will be released on a regular basis.

As a result of the above features, traditional applications have had to undergo architectural changes when the need to be compatible with, and deployed to, Kubernetes clusters emerged.

How Kubernetes affects deployments

"

Let’s consider a typical website application which has a web-ui frontend and a database backend. In traditional deployments, they are bundled together. But in a container world, they are split and ensured that they operate individually. Due to this, scaling, upgrading etc. gets easier.

When such an application is deployed to a Kubernetes cluster with a scale factor as 1, each of those containers end up in different nodes. The networking, load balancing, etc. are handled internally by Kubernetes itself. Consider the above example, being deployed to a 3 node Kubernetes cluster. The web-ui frontend ends up in node-2 and database backend gets deployed to node-1, and Kubernetes creates an internal load balancer. This routes the incoming traffic to node-2 that hosts the web-ui.

"

Let’s talk a bit about the self-healing concept of Kubernetes. This is a topic that I’ve talked about in previous articles, and refers to the nature of Kubernetes in monitoring the health of the containers hosted inside the cluster. In occasions of unhealthy behavior or problems within a node, the containers are automatically shifted to healthy nodes without user intervention. Considering our website application, assuming node-2 being unhealthy, the web-ui frontend application might be shifted to node-3, which is fairly healthy and idle. Notice that the load balancer understands this, and starts to route the incoming traffic to web-ui frontend to the new node.

Container storage interface (CSI) for Kubernetes

Our above example works quite well for the given scenario. In production workloads however, this is not the case with storage. Usually, storage is hosted outside of the Kubernetes cluster for availability, ease of backup, and many other good reasons. Considering our website application, we would like to host the storage of web-ui frontend and database backend to a cloud file storage.

One option we have is to simply mount the storage to all the nodes. But this solution does not scale. CSI for Kubernetes however addresses this. Kubernetes core started to accept contributions from storage vendors, and the core team soon realized that they had huge dependencies on these vendors for Kubernetes core releases. As a result, the Kubernetes Special Interest Group (SIG) decided to create a Container Storage Interface (CSI) and every storage vendor would implement that interface to get one’s storage working inside Kubernetes.

Considering our website application above, when a container storage interface (CSI) is implemented for a given cloud vendor, due to container shifting from one node to another, the container storage interface (CSI) will ensure that storage is also shifted along with it. The first picture below shows the scenario with web-ui frontend and database backend using cloud storage. The second picture shows the situation after both the container and storage had shifted to a healthy node-3.

Kubernetes SMB CSI

The csi-driver-smb project within the Kubernetes CSI group has been working on providing a CSI based solution for CIFS and SMB. It’s open sourced under Apache 2.0 license and maintained on github. The repository has well detailed installation instructions, a development guide, a troubleshooting guide, plus examples.

The driver deployment is divided into two parts: as Provisioner, which creates or commissions the SMB server, and Deployer, which deploys the driver.

Fusion File Share and Kubernetes CSI

Since Tuxera’s SMB solution, Fusion File Share, is CIFS compliant, the deployer works out-of-the-box with Fusion. The demonstration below will show how to get CSI working for Fusion File Share. The following steps will be performed:

1) A Kubernetes cluster will be provisioned on a cloud vendor. In this example it will be Azure, and we will be using Azure Kubernetes Service (AKS). Learn more about AKS here.

2) Kubernetes SMB CSI will be deployed to the cluster.

3) Fusion File Share by Tuxera will be provisioned on a Virtual machine in the Azure cloud.

A test workload will be deployed to the cluster to see if the CSI driver works with Fusion File Share by Tuxera.

Demonstration

The following is just a demonstration of Kubernetes CSI in Fusion File Share by Tuxera. This approach is not recommended for production workloads. Please get in touch with us for configuring your systems for production scale.

This demonstration will be mostly command line based. It uses Azure, Virtual machines, and localhost CLI for these purposes.

1.

First, ensure that a Kubernetes cluster is running and accessible from the command line.

The above command shows that we have a 3 node Kubernetes cluster running on Azure Kubernetes service (AKS).

2.

Next, deploy the Kubernetes SMB CSI driver to the cluster, using the instructions here.

This deploys 0.3.0 version of Kubernetes CSI SMB driver to our cluster.

3.

Verify if the driver deployment was successful by listing the pods.

The ‘Running’ status for the csi-smb-* pods above shows that our deployment was successful and running healthy.

4.

Create a Kubernetes secret for accessing Fusion File Share. For testing purposes, let’s use test1/test1 as our username/password combination.

5.

Next, install Fusion File Share by Tuxera on a virtual machine in an environment. This can be done in many ways, based on your needs.

For this example, I will be using Azure cloud with docker. Let’s say the public IP address of the virtual machine is E.g. 40.113.16.31.

a) Ensure that the ssh connection works with/without password.

b) Install docker in the virtual machine. I already had them in this virtual machine.

c) From another environment, create the Fusion File Share container archive and copy it to the Virtual machine. Again, there are many ways to do this.

d) Load and run the Fusion File Share by Tuxera server container exposing port 445, and also bind-mounting the /tmp of the container as the tsmb.conf is configured to use /tmp.

6.

After that, ensure that there is a Fusion File Share by Tuxera service listening on port 445. One rudimentary approach to test this is using the telnet client. This is to rule out possibilities of firewall or network interference.

7.

Create a storage class with the server information and share name. Follow the instructions found here. In our config, we just have to replace the ‘source’ attribute with the IP address and share name.

8.

Apply the storage class to the Kubernetes cluster.

9.

Now it’s time to create a workload. Let’s create a stateful set which puts a timestamp every second onto the Fusion File Share mount point. The example I’ve used above is from here.

10.

Verify the mount point exists in the stateful set container. You can see that it is mounted on /mnt/smb.

11.

Also, make sure to verify the timestamp logging is happening on the storage on our virtual machine, at the place where the Fusion File Share server is hosted.

Final thoughts

From what we’ve explored above, it’s very much evident that Tuxera’s SMB solution Fusion File Share has support for Container Storage Interface (CSI). The biggest benefit we attained was from the open source solution of the CSI driver for SMB. Now we have a common platform to start working from, and making contributions to. As Jim Whitehurst put it, “Open source isn’t about saving money, it’s about doing more stuff, and getting incremental innovation with the finite budget you have”. This is the open mindset we all should have, and the one we strive towards at Tuxera.


Fusion File Share is our highly scalable enterprise SMB server on Linux.

FIND OUT MORE