[kagent] Using AI agents in cloud native environment with kagent
Bringing Agentic AI to cloud native
[kagent] Using AI agents in cloud native environment with kagent
Bringing Agentic AI to cloud native
Open-source tools for DevOps and platform engineers to build, deploy, and run AI-powered solutions in Kubernetes. From intelligent agents to MCP servers.

Source: kagent
NOTE: No subscription? No problem. You can access the friend link here. :) You can also access all my friend links on my GitHub repo: Friend-Links.
What is kagent?
kagent helps us to run AI agents in cloud native environment. It is easy to setup and configure.
I tried a simple agent to setup a Linear MCP server and build an agent around it to maintain the project board.
My Setup
- k8s cluster running on digital ocean droplet running ubuntu 24.04 LTS.
- Generated an OPEN AI API key using their https://platform.openai.com/settings/organization/api-keys
- helm should also be installed.
- 16 GB RAM and 4 vCPU.
- Check out troubleshooting section in bottom, if you are facing errors.
Installation
- We need to export this key, so that it will be added as a model during the installation.
- Export the key using export OPENAI_API_KEY=”your-api-key-here”
- kagent provide a script to install the binary. This will copy the binary automatically in your bin folder.
curl https://raw.githubusercontent.com/kagent-dev/kagent/refs/heads/main/scripts/get-kagent | bash
- As a next step, we need to install kagent in our cluster by running below command.
kagent install --profile demo
It will take some time and install demo agents and mcp server in your cluster. On successful setup it says, kagent installed and you will find deployments related to kagent. For example, we have a deployment named kagent-controller . Below is a snapshot from k9s .

Go to service, and find the service name kagent-ui.

And, do port forwarding on 8080 or choose any port.

And, you will see kagent running on http://localhost:8080 .
Set up Linear project
As a next step, we will add Linear MCP server. Go to liner app and create a sample project there. I have setup a project named mcpdemo there. We can generate an API key under security section to authenticate ourselves for MCP server access. You can generate one here.

The key will look like this: lin_api_xxxxxxxxxxxxxxxxx
Adding MCP server to kagent
The instructions for adding Linear MCP server are provided on their documentation page.
We are going to setup streamable http linear mcp server. And, we can use below information.
- Http server address: https://mcp.linear.app/mcp
- Linear API key we created before.
{
"Authorization": "Bearer lin_api_Exxxxxxxxxxxxxxxxxxxxx"
}
We will go back to kagent dashboard. Click on Create > New MCP Server
And, Add MCP Server on MCP Servers page.

And, it will add an MCP server for you. It will take a short amount of time, and then it will list down all the tools from your MCP server.

Adding agent to use MCP Server
As a next step, let’s create a new agent to use MCP server. Click on Create > New Agent.
It will ask you for the information to configure the agent.
Agent Name: linear-app-agent

And, the agent instructions should be a good prompt. The default prompt is good to start with and can be used for demo purpose.

And, in the tools section, we will choose the tools from our recently added MCP server.

And, then finally save the selection and create the agent. Once added, it will show as Agent is not ready and we need to wait till it create all the required resources in our k8s cluster. You can see the service named based on your agent in the k8s-cluster .
Using Agent
Inside agent section, you can start the conversation with your agent and it can perform based on your prompt.

The agent can perform actions on your behalf as you have added your auth key on the linear app project board.
Troubleshooting
- I have encountered below error, while setting it up for the first time.
Failed to create file watcher: No file descriptors available (os error 24)
to create fsnotify watcher: too many open files
I fixed it by increasing the limits.
$ sudo tee /etc/security/limits.d/99-k8s-nofile.conf <<EOF
* soft nofile 1048576
* hard nofile 1048576
root soft nofile 1048576
root hard nofile 1048576
EOF
$ sudo tee /etc/sysctl.d/99-k8s-inotify.conf <<EOF
fs.inotify.max_user_watches=524288
fs.inotify.max_user_instances=1024
EOF
sudo sysctl --system
And, then reboot the machine.
Unlock the Magic of Knowledge — Follow & Subscribe to stay updated! 💌
You can also become a part of our WhatsApp community (focused on Go and Web Development) by scanning below QR code.

Source: WhatsApp Channel
WhatsApp Channel: codingtherightway
Shower your love ❤
Clap guide in summary:
1–2 Claps — An average article
3–10 Claps — Very good article
11–20 Claps — Very helpful and value addition
21+ Claps — Supporting your efforts :)
Thank you for reading.
메타데이터
- post_id
- 0eefd37721f5
- slug
- kagent-using-ai-agents-in-cloud-native-environment-with-kagent-0eefd37721f5
- url
- https://levelup.gitconnected.com/kagent-using-ai-agents-in-cloud-native-environment-with-kagent-0eefd37721f5
- canonical_url
- https://levelup.gitconnected.com/kagent-using-ai-agents-in-cloud-native-environment-with-kagent-0eefd37721f5
- author_url
- https://medium.com/@sarvsav
- status
- ok
- fetched_at
- 2026-06-15 20:49:13