We can LLMs in three ways by usually
AI agents are semi autonomous systems that interact with environment, make decisions and perform tasks on behalf of users.
K8S is a dynamic network. Pods are ephemeral. IP change on every restart.
Containers with in the pod shared a single network namespace.
K8S networking Model:
1) Every Pod receive a unique and cluster wide IP address.
2) All pods on the same node can communicate directly without NAT
3) All pods on different nods can communicate directly without NAT
4) A Pod self seen IP is identical to the IP other pods use to reach it [Flat network]
Kubernetes specifies what is required and CNI plugins decide How to implement it
Communication pattern in K8S
Container to Container - within same pod via loopbackup [127.0.0.1]
Pod to Pod - Direct IP communication across nodes without address translation
Pod to Service - Kube proxy intercepts traffic and load balancing to healthy end points
External to Service - Exposed via NodePort, LoadBalance type or Ingress controller
Node to Pod - Kubelet and monitoring agents
Infra [pause] container creates and own a network namespace for the pod. All application containers in the Pod share the Infra container namespace at startup.
Virtual [veth] pair : Two virtual NICs connect between Pod and Node side. One end lives inside the Pod's network namespace [eth0] and other end is attached to Node like linux bridge [cbr0]
Traffic flow : Pod [eth0] -> veth pair -> host bridge -> node routing table -> destination
Analysis a packet flow under flannel CNI.
controlplane:~$ kubectl get pods -n kube-flannel -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
kube-flannel-ds-5sv5v 1/1 Running 0 15m controlplane <none> <none>
kube-flannel-ds-n7dxx 1/1 Running 0 15m node01 <none> <none>
controlplane:~$
node01:~$ tcpdump -i flannel.1 -n 'tcp' -vvv
tcpdump: listening on flannel.1, link-type EN10MB (Ethernet), snapshot length 262144 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
node01:~$
Service:
K8S will face very difficult to manage an IP address across PODs. This issue will fix by service which providing an stable virtual IP (Cluster IP). It will act as a load balancer across all the pods. It will enable a loose coupling within application.
Service components:
Cursor 2.0 is an AI editor for Production Environment. It will be run 8 parallel agents without any issue.
Context Management like telling story when it getting convoluted. It will direct path when AI get confused.
Context window is a windows chat where user and AI interact each other.
TLS1.3 is released in August 2018 (RFC8446). It is a latest version of Transport Layer Protocol. It will remove a weaker algorithms and improve a speed of authentication.
TLS 1.2 Cipher suit diagram: