• The API Platform for AI.

      Explore More
      Platform Runtimes
      Kong Gateway
      • Kong Cloud Gateways
      • Kong Ingress Controller
      • Kong Operator
      • Kong Gateway Plugins
      Kong AI Gateway
      Kong Event Gateway
      Kong Mesh
      Platform Core Services
      • Gateway Manager
      • Mesh Manager
      • Service Catalog
      Platform Applications
      • Developer Portal
      • API and AI Analytics
      • API Products
      Development Tools
      Kong Insomnia
      • API Design
      • API Testing and Debugging
      Self-Hosted API Management
      Kong Gateway Enterprise
      Kong Open Source Projects
      • Kong Gateway OSS
      • Kuma
      • Kong Insomnia OSS
      • Kong Community
      Get Started
      • Sign Up for Kong Konnect
      • Documentation
    • Featured
      Open Banking SolutionsMobile Application API DevelopmentBuild a Developer PlatformAPI SecurityAPI GovernanceKafka Event StreamingAI GovernanceAPI Productization
      Industry
      Financial ServicesHealthcareHigher EducationInsuranceManufacturingRetailSoftware & TechnologyTransportation
      Use Case
      API Gateway for IstioBuild on KubernetesDecentralized Load BalancingMonolith to MicroservicesObservabilityPower OpenAI ApplicationsService Mesh ConnectivityZero Trust SecuritySee all Solutions
      Demo

      Learn how to innovate faster while maintaining the highest security standards and customer trust

      Register Now
  • Customers
    • Documentation
      Kong KonnectKong GatewayKong MeshKong AI GatewayKong InsomniaPlugin Hub
      Explore
      BlogLearning CentereBooksReportsDemosCase StudiesVideos
      Events
      API SummitWebinarsUser CallsWorkshopsMeetupsSee All Events
      For Developers
      Get StartedCommunityCertificationTraining
    • Company
      About UsWhy Kong?CareersPress RoomInvestorsContact Us
      Partner
      Kong Partner Program
      Security
      Trust and Compliance
      Support
      Enterprise Support PortalProfessional ServicesDocumentation
      Press Release

      Kong Expands with New Headquarters in Downtown San Francisco

      Read More
  • Pricing
  • Login
  • Get a Demo
  • Start for Free
Blog
  • Engineering
  • Enterprise
  • Learning Center
  • Kong News
  • Product Releases
    • API Gateway
    • Service Mesh
    • Insomnia
    • Kubernetes
    • API Security
    • AI Gateway
  • Home
  • Blog
  • Engineering
  • Staying Agile on VMs and Kubernetes With Service Mesh
Engineering
July 8, 2021
4 min read

Staying Agile on VMs and Kubernetes With Service Mesh

Ned Harris

Over the past ten years, Clubhouse and other innovative startups built software quickly. They started from scratch and blew past their incumbents. But the fact of the matter is that speed is no longer a differentiator. Everyone can move quickly. We've seen it as Facebook and Twitter quickly duplicated Clubhouse's "innovative" functionality.

Today, it’s all about agility—taking the momentum that you’ve already built up. Agility makes it easier for companies to quickly replicate innovations in the market and adopt them as their own.

By aligning around a few key principles, you too can stay agile:

  1. Don't throw away or duplicate code. The benefit is a shift to innovation.
  2. Bring along old applications. That way, you can inherit policy, security and best practices.
  3. Maintain connectivity across the heterogeneous. This will result in simplified application maintenance.

A service mesh like Kuma or Kong Mesh can help you remain agile and scale by providing end-to-end service connectivity across architectures and modern protocols to connect clouds to virtual machines. So whether you're working at a retailer trying to connect their old monolithic-based inventory or fulfillment systems or a bank that can't seem to move off of those decades-old servers, it's critical to stay agile across environments.

Let's see how with an example.

Example: Connecting a Legacy Service to a Modern Architecture

In my example, I have containerized apps in my Kubernetes environment. Many of these were scooped out from legacy monoliths. Unfortunately, it hasn't been possible or sensible to transition all of my applications yet.

Specifically, the current problem is with my VM-based natural language processor service. Not being able to connect this natural processing language service has stopped my whole solution from working.

In an enterprise with many legacy systems, this could go beyond VMs. It could be a rack server or a bunch of servers in a data center.

The preferable thing to do with a service mesh is to get a data plane proxy on that service, but that's not possible right now due to internal politics. So getting something installed on this machine is probably not going to happen today. I'm going to keep trying to get access, but for now, this needs to get done today.

In this scenario, where we don't have access to the VM-based natural language processor, we can do something called an external service in the mesh, which will give us the proxy. Doing this is a common first step into getting connectivity going across services to which you have limited access.

In the below screenshot, you can see my environment. I have the Apollo service (my GraphQL), a blogging service, a user service and Postgres. I'm just missing that natural language processing service to get my application working.

Check the VM Service Connection

I can test that in Insomnia. If I go over to run this, we time out in 15 seconds because it’s a hard dependency.

Access VM Service with Service Mesh

In the Apollo service below, we can see it's asking for the natural language processing service. So how do we get access to this kind of external service and still use our service mesh?

One thing that we can do is build this into our deployment. In my Kubernetes definition, I have my blog service. I have some environment variables and a value for NLP, which is just a URL. It’s this NLP EXT service, and it’s coming to port 3000. And that’s what’s failing because the connectivity issue isn't resolved yet.

In my service mesh, I'll build an external service policy that’s essentially going to point to that external service outside of the service mesh and give me the ability to proxy to it and meet it halfway. So I could still apply policies and get visibility. But, still, it won't be the same benefit of putting a data plane proxy onto that server that would pull in the service mesh to enforce policy completely.

Nonetheless, it does give some advantages. For instance, I could extend my mutual TLS policy beyond or at least cover that first half.

I'll go ahead and apply this.

That created an external service that will now be accessible by my application through the service mesh.

I'll do a nslookup to check. It's now going through my DNS because I have a DNS layer. So I'm basically resolving to it since I built that service.

Test VM Service Connection Again

If I test this again in Insomnia, I'm back in business. All this is just leveraging an external API to our Kubernetes environments, actually in a whole different Google project in reality. It’s running on a VM. But again, this could be a bare metal server.

Conclusion

Ideally, this would buy you some time to solve the internal politics and get that data plane proxy on the service. That way, you'll get the complete benefits from the service mesh. But it doesn’t have to be an all-or-nothing proposition.

In this quick example, I took this service that I didn’t control and gave the mesh a way to know about it in its DNS space. Then, it used our natural Kubernetes configurations and manifested to connect to it as business as usual.

Service connectivity is central to making your business more agile. I hope this article gave you some ideas for how to get a quick win on your journey from monolith to microservices.

Topics:Service Mesh
|
Kubernetes
Powering the API world

Increase developer productivity, security, and performance at scale with the unified platform for API management, service mesh, and ingress controller.

Sign up for Kong newsletter

Platform
Kong KonnectKong GatewayKong AI GatewayKong InsomniaDeveloper PortalGateway ManagerCloud GatewayGet a Demo
Explore More
Open Banking API SolutionsAPI Governance SolutionsIstio API Gateway IntegrationKubernetes API ManagementAPI Gateway: Build vs BuyKong vs PostmanKong vs MuleSoftKong vs Apigee
Documentation
Kong Konnect DocsKong Gateway DocsKong Mesh DocsKong AI GatewayKong Insomnia DocsKong Plugin Hub
Open Source
Kong GatewayKumaInsomniaKong Community
Company
About KongCustomersCareersPressEventsContactPricing
  • Terms•
  • Privacy•
  • Trust and Compliance
  • © Kong Inc. 2025