This article is from Rancher Labs

Before the speech

In fact, there is no single migration path that is suitable for migrating all legacy applications to the cloud. These applications are typically on physical machines, virtual machines, or local. While it is common to redesign the application architecture to accommodate cloud native services, this is not the only answer. Reconstructing an existing application architecture as a microservice or cloud-native architecture presents challenges such as cost of refactoring, complexity, and application dependencies.

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

Many enterprises want to migrate to modern architectures in the expectation that they will gain complexity, security, and usability for their applications. Containers provide the flexibility to modernize and move applications to cloud acoustic services. In this article, we will focus on applications that can be migrated to containers, generally. Net, Web, SQL, and other applications that run on Windows2003 without dependencies. You can migrate these applications to containers without changing the code and make them portable in the future. You will enjoy the benefits of running containers on Kubernetes, such as orchestration, availability, higher elastic scaling and density.

Note: Not all applications and services can run in a container. Some applications have core dependencies (databases, storage requirements, and so on) that need to be addressed. In addition, the longevity of the application needs to be determined by the business.

Business level: Advantages of migrating 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 achieve portability

  • Application security is improved

  • Save the enterprise time to reevaluate existing applications

Since Kubernetes supports Worker nodes for Windows, you can migrate traditional Windows applications to modern architectures. Windows worker and Linux worker can coexist in the same Kubernetes platform, that is to say, the operation and maintenance team can apply the same set of tools, practices and processes.

Step1: analyze the migration process from Windows to K8S

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

  • Decompose the application: Break the application into 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

Move to containerized, based. The.net platform is a complex process that involves many steps. As a result, some key decisions need to be made when executing this process. The following procedure provides some guidance on the requirements for migrating older Windows systems to run on Kubernetes.

  • Determine which operating system your container will need – Server Core or Nano Server. This needs to be selected based on the dependencies of the application.

  • Follow compatibility guidelines. Running a 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 shares a kernel with the underlying host. As of writing, only server quarantine processes are supported. However, support for Hyper-V isolation will begin soon (when unknown), which will help host and container compatibility.

  • Package your traditional applications.

  • Build the initial Docker-based container using the application package.

  • Deploy a new Docker container in the repository of your choice

  • Leverage existing DevOps tools (CI/CD build and release pipeline)

  • Deploy the new Windows application into the Kubernetes environment that you have built to support Windows

  • Test, test, test

Key advantages of migrating Windows applications to K8S

By migrating from Windows to Kubernetes, your old application will enjoy the advantages of your existing container-based application. In addition, your Windows container will benefit from the Kubernetes platform itself. Furthermore, they can use tools and systems in the Kubernetes ecosystem, including security tools, service grids, monitoring/alarms, and so on.

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

Key points of migrating from Windows to K8S

  • Container-based solutions can save money

  • Containers reduce dependencies and provide portability to applications

  • Docker is already the de facto standard for running containers, and 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

  • Leveraging native and ecosystem-based Kubernetes tools improves security and adds 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 dramatically reduces the complexity of using Windows containers for enterprises and provides a quick way to modernize Windows-based legacy applications — whether they run locally or in a multi-cloud environment. In addition, Rancher 2.3 can containerize and transform them into efficient, secure and portable, multi-cloud applications, eliminating the need to rewrite applications.

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.