This article is from Rancher Labs

Before the speech

In fact, no single migration path is suitable for migrating all traditional applications to the cloud. These applications are usually on the physical machine, virtual machine, or local. While it is common to redesign the application architecture to accommodate cloud native services, this is not the only answer. Rebuilding an existing application architecture into a microservice or cloud native architecture presents many challenges, such as refactoring costs, complexity, and application dependencies.

While there are many benefits to modernizing an application’s architecture, many organizations still run existing services on Windows 2003 Servers. Microsoft’s removal of support for Windows 2003 poses some challenges. First, people have to start deciding what to do with these applications, especially as the Windows 2008 life cycle is coming to an end.

Many enterprises want to migrate to modern architectures in the hope that their applications will gain complexity, security, and availability. The container provides the flexibility to modernize the application and move it to cloud acoustic services. In this article, we will focus on applications that can be migrated to containers, typically. NET, Web, SQL, and other applications that have no dependencies but run on Windows2003. You can migrate these applications to the container without changing the code and make them portable in the future. You will enjoy the benefits of running containers on Kubernetes, such as choreographability, availability, higher elastic scaling, and density.

Note that not all applications and services can run in a container. Some applications have core dependencies (such as databases, storage requirements, and so on) that need to be addressed. In addition, the application’s lifetime needs to be determined based on the business.

Business side: Advantages of moving to Kubernetes

There are some key business reasons for migrating these applications to containers, such as:

  • High return on investment
  • Traditional Web-based services can be portable
  • Application security is improved
  • It saves the enterprise time to re-evaluate existing applications

Since Kubernetes supports Windows worker nodes, you can migrate traditional Windows applications to modern architectures. Windows workers and Linux workers can co-exist on the same Kubernetes platform, that is, the operation and maintenance team can apply the same set of tools, practices and processes.

Step1: Analyze the process of migrating from Windows to K8S

Migrating traditional applications to Kubernetes requires a lot of analysis and planning. However, there are some key practices that are essential, such as:

  • Decompose the application: Break the application down to its raw form to understand which components are running, how they are running, and their dependencies
  • Discover the services provided by the application and the calls made on data, network, and so on
  • Decouple the data layer from the application
  • Identify and map service dependencies
  • Test, test, test

Step2: Plan the migration process from Windows to K8S

Migration to containerized, based. NET platform is a complex process, which involves many steps. As a result, some key decisions need to be made when executing this process. The following procedures provide some guidance on the requirements for migrating older Windows systems to run on Kubernetes.

  • Determine which operating system your container needs – Server Core or Nano Server. This needs to be chosen based on the dependencies of the application.
  • Follow compatibility guidelines. Running the Windows container adds strict compatibility rules for the OS version of the host and the base image the container is running on. They must run Windows 2019 because the container and the underlying host share the same kernel. As of writing, only server isolation processes are supported. However, support for Hyper-V isolation will begin soon (exact timing unknown), which will help host and container compatibility.
  • Package your legacy applications.
  • Use the application package to build the initial Docker-based container.
  • Deploy a new Docker container in the repository of your choice
  • Leverage existing DevOps tools (CI/CD build and release pipeline)
  • Deploy a new Windows application to the Windows-enabled Kubernetes environment you’ve built
  • Test, test, test

Key advantages of migrating Windows applications to K8S

By migrating from Windows to Kubernetes, your legacy applications will enjoy the advantages of your existing container-based applications. In addition, your Windows container will benefit from the Kubernetes platform itself. Furthermore, they have access to tools and systems in the Kubernetes ecosystem, including security tools, service grids, monitoring/alerting, and more.

Taken together, these advantages can put you in a good position to make key decisions about your application and explore business use cases. For applications that cannot be migrated, there is a lack of support for the underlying operating system, so you cannot leave them alone and still need to decide what to do with them. And since there are no other patches or security remedies available, your enterprise is vulnerable to vulnerabilities and attacks, so take prompt action.

Key points of migrating from Windows to K8S

  • Container-based solutions can save money
  • Containers reduce dependencies and provide portability for applications
  • Docker is already the de facto standard for running containers, while Kubernetes is the de facto standard for container choreography engines
  • Kubernetes can host scalable, reliable, and resilient Windows container-based applications as well as Linux-based applications
  • Organizations running the Kubernetes platform can integrate traditional applications into their DevOps culture and tools
  • Leverage native and ecosystem based Kubernetes tools can improve security and add an additional layer of protection to traditional applications

In Rancher 2.3, GA added support for Windows containers. By bringing all the benefits of Kubernetes to Windows, Rancher 2.3 greatly reduces the complexity of using Windows containers for enterprises and provides a quick path to modernize Windows-based legacy applications — whether they are running locally or in a cloudy environment. In addition, Rancher 2.3 can containerize them and turn them into efficient, secure and portable cloud applications, eliminating the need to rewrite the application.

Author’s brief introduction

Kelly Griffin is an infrastructure, security and microservices consultant with over 20 years of experience in providing enterprise solutions. He has worked for companies all over the world, including Australia, Singapore and New Zealand. He has extensive experience with containerization using Docker and Kubernetes.