<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Amit Gupta on Medium]]></title>
        <description><![CDATA[Stories by Amit Gupta on Medium]]></description>
        <link>https://medium.com/@amitmavgupta?source=rss-a806cc5ade28------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Amit Gupta on Medium</title>
            <link>https://medium.com/@amitmavgupta?source=rss-a806cc5ade28------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:45:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amitmavgupta/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ClusterAPI Provider for AWS and Cilium]]></title>
            <link>https://awstip.com/clusterapi-provider-for-aws-and-cilium-e73dcdf44459?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/e73dcdf44459</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[elastickubernetesservice]]></category>
            <category><![CDATA[cluster-api]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cilium]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Sat, 31 May 2025 11:08:54 GMT</pubDate>
            <atom:updated>2025-07-21T15:03:42.093Z</atom:updated>
            <content:encoded><![CDATA[<h3>ClusterAPI for AWS and Cilium</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DtvLBa4-O9PQFtTgBYjUBw.png" /><figcaption>Source- <a href="https://cluster-api.sigs.k8s.io/user/concepts">ClusterAPI</a></figcaption></figure><h3>☸ ️Introduction</h3><p>Cluster API is a Kubernetes sub-project focused on providing declarative APIs and tooling to simplify provisioning, upgrading, and operating multiple Kubernetes clusters.</p><p><a href="https://github.com/kubernetes-sigs/cluster-api-provider-aws">Cluster API Provider for aws</a> (CAPA), maintained by the opensource <a href="https://github.com/kubernetes-sigs/cluster-api-provider-aws">community,</a> is a SIG Cluster Lifecycle project. You can deploy and upgrade Kubernetes clusters by handling infrastructure provisioning in AWS. CAPA enables provisioning of <a href="https://docs.aws.amazon.com/ec2/?icmpid=docs_homepage_featuredsvcs">Amazon EC2</a> and <a href="https://docs.aws.amazon.com/eks/?icmpid=docs_homepage_containers">Amazon EKS</a> based Kubernetes clusters.</p><h3>🎯Goals &amp; Objectives</h3><p>In this article you will learn how to create a kubernetes cluster using Cluster API in AWS on an existing KinD cluster and then install Cilium as the CNI.</p><p>The KinD cluster acts as the management cluster and will manage the CAPI cluster in AWS.</p><h3>What features does Cluster API for AWS provide?</h3><p>For Amazon EKS, CAPA has the following features:</p><ul><li>Provisioning and managing an Amazon EKS Cluster</li><li>Upgrading the Kubernetes version of the Amazon EKS Cluster</li><li>Attaching a self-managed machines as nodes to the Amazon EKS cluster</li><li>Creating a machine pool and attaching it to the Amazon EKS cluster. See <a href="https://cluster-api-aws.sigs.k8s.io/topics/machinepools.html">machine pool docs for details</a>.</li><li>Managing Amazon “EKS Addons”.</li><li>Creating an Amazon EKS <a href="https://docs.aws.amazon.com/ecs/?icmpid=docs_homepage_serverless">AWS Fargate</a> profile.</li><li>Managing an <a href="https://docs.aws.amazon.com/iam/?icmpid=docs_homepage_security">AWS Identity and Access management</a> (AWS IAM) aws-iam-authenticator configuration.</li></ul><h3>Pre-Requisites</h3><ul><li>You should have an <a href="https://portal.aws.amazon.com/billing/signup?pg=premsprice&amp;cta=herobtn&amp;redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start/email">AWS subscription</a>.</li><li>The Security Group/ NSG should allow port 443, 6443 and 8443 for outbound communication where you are creating your KinD cluster.</li><li>Install <a href="https://kubernetes.io/releases/download/#kubectl">kubectl</a></li><li>Install <a href="https://helm.sh/docs/intro/install/">Helm</a></li><li>Install <a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html">awscli</a></li><li>Install <a href="https://github.com/kubernetes-sigs/aws-iam-authenticator">aws-iam-authenticator</a></li><li>The following <a href="https://docs.cilium.io/en/v1.13/network/concepts/ipam/eni/#required-privileges">EC2 privileges</a> are required by the Cilium operator in order to perform ENI creation and IP allocation.</li></ul><h3>Lets’ get going</h3><h4>Create a KinD cluster</h4><p>We will use <a href="https://kind.sigs.k8s.io/">kind</a> for the creation of a temporary <a href="https://cluster-api-aws.sigs.k8s.io/reference/glossary.html#bootstrap-cluster">bootstrap cluster</a> used to provision a target <a href="https://cluster-api-aws.sigs.k8s.io/reference/glossary.html#management-cluster">management cluster</a> on the AWS infrastructure provider.</p><ul><li>Create the kind cluster</li></ul><pre>kind create cluster</pre><ul><li>Test to ensure the local kind cluster is ready:</li></ul><pre>kubectl cluster-info</pre><h4>Install clusterctl</h4><p>The clusterctl CLI tool handles the lifecycle of a Cluster API management cluster.</p><pre>curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.10.2/clusterctl-linux-amd64 -o clusterctl<br>sudo install -o root -g root -m 0755 clusterctl /usr/local/bin/clusterctl<br>clusterctl version</pre><h4>Initialize the management cluster</h4><p>Now that we’ve got clusterctl installed and all the prerequisites in place, let’s transform the Kubernetes cluster into a management cluster by using clusterctl init.</p><p>The command accepts as input a list of providers to install; when executed for the first time, clusterctl init automatically adds to the list the cluster-api core provider, and if unspecified, it also adds the kubeadm bootstrap and kubeadm control-plane providers.</p><h4>Install clusterawsadm</h4><pre>curl -L https://github.com/kubernetes-sigs/cluster-api-provider-aws/releases/download/v0.0.0/clusterawsadm-linux-amd64 -o clusterawsadm<br>chmod +x clusterawsadm<br>sudo mv clusterawsadm /usr/local/bin<br>clusterawsadm version</pre><h4>Bootstrap Config file</h4><ul><li>Create a file called eks.config with the following contents:</li></ul><pre>apiVersion: bootstrap.aws.infrastructure.cluster.x-k8s.io/v1alpha1<br>kind: AWSIAMConfiguration<br>spec:<br>  bootstrapUser:<br>    enable: true<br>  eks:<br>    enable: true<br>    iamRoleCreation: true # Set to true if you plan to use the EKSEnableIAM feature flag to enable automatic creation of IAM roles<br>    defaultControlPlaneRole:<br>        disable: false # Set to false to enable creation of the default control plane role</pre><ul><li>Set the environment variables for your environment and use the eks.config file to create the required IAM resources in AWS:</li></ul><pre>export AWS_REGION=ap-northeast-2<br>export AWS_ACCESS_KEY_ID=&lt;access-key-for-bootstrap-user&gt;<br>export AWS_SECRET_ACCESS_KEY=&lt;secret-access-key-for-bootstrap-user&gt;</pre><ul><li>Prepare the environment for CAPA by running clusterawsadm</li></ul><pre>clusterawsadm bootstrap iam create-cloudformation-stack  --config eks.config<br>Attempting to create AWS CloudFormation stack cluster-api-provider-aws-sigs-k8s-io<br><br><br>Following resources are in the stack:<br><br>Resource                  |Type                                                                                  |Status<br>AWS::IAM::Group           |cluster-api-provider-aws-si-AWSIAMGroupBootstrapper-############                      |CREATE_COMPLETE<br>AWS::IAM::InstanceProfile |control-plane.cluster-api-provider-aws.sigs.k8s.io                                    |CREATE_COMPLETE<br>AWS::IAM::InstanceProfile |controllers.cluster-api-provider-aws.sigs.k8s.io                                      |CREATE_COMPLETE<br>AWS::IAM::InstanceProfile |nodes.cluster-api-provider-aws.sigs.k8s.io                                            |CREATE_COMPLETE<br>AWS::IAM::ManagedPolicy   |arn:aws:iam::############:policy/control-plane.cluster-api-provider-aws.sigs.k8s.io   |CREATE_COMPLETE<br>AWS::IAM::ManagedPolicy   |arn:aws:iam::############:policy/nodes.cluster-api-provider-aws.sigs.k8s.io           |CREATE_COMPLETE<br>AWS::IAM::ManagedPolicy   |arn:aws:iam::############:policy/controllers.cluster-api-provider-aws.sigs.k8s.io     |CREATE_COMPLETE<br>AWS::IAM::ManagedPolicy   |arn:aws:iam::############:policy/controllers-eks.cluster-api-provider-aws.sigs.k8s.io |CREATE_COMPLETE<br>AWS::IAM::Role            |control-plane.cluster-api-provider-aws.sigs.k8s.io                                    |CREATE_COMPLETE<br>AWS::IAM::Role            |controllers.cluster-api-provider-aws.sigs.k8s.io                                      |CREATE_COMPLETE<br>AWS::IAM::Role            |eks-controlplane.cluster-api-provider-aws.sigs.k8s.io                                 |CREATE_COMPLETE<br>AWS::IAM::Role            |nodes.cluster-api-provider-aws.sigs.k8s.io                                            |CREATE_COMPLETE<br>AWS::IAM::User            |bootstrapper.cluster-api-provider-aws.sigs.k8s.io                                     |CREATE_COMPLETE</pre><ul><li>This creates an IAM user called bootstrapper.cluster-api-provider-aws.sigs.k8s.io. The user belongs to an IAM group with the prefix cluster-api-provider. This is done via a CloudFormation stack in the background.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w2jn1IY2ZNV6yZJCuf9L2A.png" /></figure><ul><li>Export your AWS credentials to an environment variable.</li></ul><pre>export AWS_B64ENCODED_CREDENTIALS=$(clusterawsadm bootstrap credentials encode-as-profile)</pre><h4>Enable Cluster API for AWS</h4><ul><li>Install the Cluster API Provider for AWS</li></ul><pre>clusterctl init --infrastructure aws</pre><ul><li>This will provision a whole slew of resources into your KinD cluster including the set of Providers as seen below:</li></ul><pre>#kubectl get providers -A<br>NAMESPACE                           NAME                    AGE    TYPE                     PROVIDER      VERSION<br>capa-system                         infrastructure-aws      6h6m   InfrastructureProvider   aws           v2.8.2<br>capi-kubeadm-bootstrap-system       bootstrap-kubeadm       6h6m   BootstrapProvider        kubeadm       v1.10.2<br>capi-kubeadm-control-plane-system   control-plane-kubeadm   6h6m   ControlPlaneProvider     kubeadm       v1.10.2<br>capi-system                         cluster-api             6h6m   CoreProvider             cluster-api   v1.10.2</pre><ul><li>Create a file called control-plane-manager-role.yaml with the following contents:</li></ul><pre>kind: ClusterRole<br>apiVersion: rbac.authorization.k8s.io/v1<br>metadata:<br>  name: capa-eks-control-plane-system-capa-eks-control-plane-manager-role<br>  labels:<br>    cluster.x-k8s.io/provider: control-plane-aws-eks<br>    clusterctl.cluster.x-k8s.io: &#39;&#39;<br>rules:<br>  - verbs:<br>      - create<br>      - delete<br>      - get<br>      - list<br>      - patch<br>      - update<br>      - watch<br>    apiGroups:<br>      - &#39;&#39;<br>    resources:<br>      - secrets<br>  - verbs:<br>      - get<br>      - list<br>      - watch<br>    apiGroups:<br>      - cluster.x-k8s.io<br>    resources:<br>      - clusters<br>      - clusters/status<br>  - verbs:<br>      - create<br>      - delete<br>      - get<br>      - list<br>      - patch<br>      - update<br>      - watch<br>    apiGroups:<br>      - controlplane.cluster.x-k8s.io<br>    resources:<br>      - awsmanagedcontrolplanes<br>  - verbs:<br>      - get<br>      - patch<br>      - update<br>    apiGroups:<br>      - controlplane.cluster.x-k8s.io<br>    resources:<br>      - awsmanagedcontrolplanes/status<br>  - verbs:<br>      - create<br>      - get<br>      - list<br>      - patch<br>      - watch<br>    apiGroups:<br>      - &#39;&#39;<br>    resources:<br>      - events<br>  - verbs:<br>      - get<br>      - list<br>      - watch<br>    apiGroups:<br>      - infrastructure.cluster.x-k8s.io<br>    resources:<br>      - awsclustercontrolleridentities<br>      - awsclusterroleidentities<br>      - awsclusterstaticidentities<br>  - verbs:<br>      - get<br>      - list<br>      - watch<br>    apiGroups:<br>      - infrastructure.cluster.x-k8s.io<br>    resources:<br>      - awsmachinepools<br>      - awsmachinepools/status<br>  - verbs:<br>      - get<br>      - list<br>      - watch<br>    apiGroups:<br>      - infrastructure.cluster.x-k8s.io<br>    resources:<br>      - awsmachines<br>      - awsmachines/status<br>  - verbs:<br>      - get<br>      - list<br>      - watch<br>    apiGroups:<br>      - infrastructure.cluster.x-k8s.io<br>    resources:<br>      - awsmanagedclusters<br>      - awsmanagedclusters/status<br>  - verbs:<br>      - get<br>      - list<br>      - watch<br>    apiGroups:<br>      - infrastructure.cluster.x-k8s.io<br>    resources:<br>      - awsmanagedmachinepools<br>      - awsmanagedmachinepools/status</pre><ul><li>Apply the updated ClusterRole to your cluster</li></ul><pre>kubectl apply -f control-plane-manager-role.yaml</pre><h4>Create a Workload Cluster in EKS</h4><ul><li>Generate a yaml for the <strong>eks</strong> flavor for your cluster</li></ul><pre>export AWS_REGION=ap-northeast-2<br>export AWS_SSH_KEY_NAME=amit-seoul<br>export KUBERNETES_VERSION=1.30.0<br>export WORKER_MACHINE_COUNT=2<br>export CONTROL_PLANE_MACHINE_COUNT=2<br>export AWS_CONTROL_PLANE_MACHINE_TYPE=m5.large<br>export AWS_NODE_MACHINE_TYPE=m5.large<br>clusterctl generate cluster capieks &gt; capieks.yaml</pre><ul><li>Apply the capieks.yaml to your KinD cluster</li></ul><pre>kubectl apply -f capieks.yaml</pre><p>The AWS provider for the Cluster API will, by default, create a VPC that spans multiple AZs with public and private subnets. It will also create NAT gateways for each private subnet, configure the necessary route tables, etc. Once the infrastructure is ready, it provisions an EKS cluster with 2 m5.large instances which are unmanaged/ self-managed nodes.</p><h4>Accessing the Workload Cluster</h4><ul><li>The cluster will now start provisioning. You can check status with:</li></ul><pre>kubectl get cluster<br>NAME      CLUSTERCLASS   PHASE         AGE     VERSION<br>capieks                  Provisioned   6h20m</pre><ul><li>You can also get an “at glance” view of the cluster and its resources by running:</li></ul><pre>clusterctl describe cluster capieks<br>NAME                                                           READY  SEVERITY  REASON  SINCE  MESSAGE<br>Cluster/capieks                                                True                     6h10m<br>├─ClusterInfrastructure - AWSManagedCluster/capieks<br>├─ControlPlane - AWSManagedControlPlane/capieks-control-plane  True                     6h10m<br>└─Workers<br>  └─MachineDeployment/capieks-md-0                             True                     5m16s<br>    └─2 Machines...                                            True                     6h10m  See capieks-md-0-rnl5h-h8vgx, capieks-md-0-rnl5h-prv89</pre><ul><li>To use the newly created cluster, get the generated kubeconfig from the KinD cluster with the following command:</li></ul><pre>kubectl --namespace=default get secret capieks-user-kubeconfig    -o jsonpath={.data.value} | base64 --decode    &gt; capieks.kubeconfig<br><br>aws eks update-kubeconfig --region ap-northeast-2 --name default_capieks-control-plane</pre><h4>Deploy a CNI solution</h4><ul><li>Setup Helm repository.</li></ul><pre>helm repo add cilium https://helm.cilium.io/</pre><ul><li>Patch VPC CNI (aws-node DaemonSet)- Cilium will manage ENIs instead of VPC CNI, so the aws-node DaemonSet has to be patched to prevent conflict behavior.</li></ul><pre>kubectl -n kube-system patch daemonset aws-node --type=&#39;strategic&#39; -p=&#39;{&quot;spec&quot;:{&quot;template&quot;:{&quot;spec&quot;:{&quot;nodeSelector&quot;:{&quot;io.cilium/aws-node-enabled&quot;:&quot;true&quot;}}}}}&#39;</pre><ul><li>Install Cilium in ENI mode.</li></ul><pre>helm install cilium cilium/cilium --version 1.15   --namespace kube-system   --set eni.enabled=true   --set ipam.mode=eni   --set egressMasqueradeInterfaces=ens+   --set routingMode=native</pre><ul><li>Ensure that all the pods and nodes are up and running</li></ul><pre>kubectl get nodes -o wide<br>NAME                                             STATUS   ROLES    AGE     VERSION                INTERNAL-IP   EXTERNAL-IP   OS-IMAGE         KERNEL-VERSION                  CONTAINER-RUNTIME<br>ip-10-0-127-90.ap-northeast-2.compute.internal   Ready    &lt;none&gt;   6h21m   v1.30.11-eks-473151a   10.0.127.90   &lt;none&gt;        Amazon Linux 2   5.10.236-228.935.amzn2.x86_64   containerd://1.7.27<br>ip-10-0-64-186.ap-northeast-2.compute.internal   Ready    &lt;none&gt;   6h21m   v1.30.11-eks-473151a   10.0.64.186   &lt;none&gt;        Amazon Linux 2   5.10.236-228.935.amzn2.x86_64   containerd://1.7.27</pre><pre>kubectl get pods -o wide -A<br>NAMESPACE     NAME                                         READY   STATUS    RESTARTS   AGE     IP             NODE                                             NOMINATED NODE   READINESS GATES<br>kube-system   cilium-bht62                                 1/1     Running   0          5h22m   10.0.127.90    ip-10-0-127-90.ap-northeast-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-clhx2                                 1/1     Running   0          5h22m   10.0.64.186    ip-10-0-64-186.ap-northeast-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-cf95c8d69-vnb5x              1/1     Running   0          5h22m   10.0.64.186    ip-10-0-64-186.ap-northeast-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-cf95c8d69-zlmf5              1/1     Running   0          5h22m   10.0.127.90    ip-10-0-127-90.ap-northeast-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5b9dfbf96-tx87r                      1/1     Running   0          5h22m   10.0.67.24     ip-10-0-64-186.ap-northeast-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5b9dfbf96-vwqkd                      1/1     Running   0          5h22m   10.0.82.197    ip-10-0-127-90.ap-northeast-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-9ltc4                             1/1     Running   0          6h22m   10.0.64.186    ip-10-0-64-186.ap-northeast-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-cs9dx                             1/1     Running   0          6h22m   10.0.127.90    ip-10-0-127-90.ap-northeast-2.compute.internal   &lt;none&gt;           &lt;none&gt;</pre><h3>Points to remember</h3><ul><li>Documentation for CAPI for AWS states that the KinD cluster should not be created with a CNI but it seems to have been <a href="https://github.com/kubernetes-sigs/cluster-api/issues/4817">updated</a> because minus the coreDNS pod being available the providers are not downloaded.</li><li>If you happen to run into a state where the workload cluster has to be created again, you might hit this <a href="https://github.com/kubernetes-sigs/cluster-api/issues/4810">issue</a>. Ideal way would be to create the management KinD cluster again and then proceed.</li></ul><h3>References</h3><ul><li><a href="https://cluster-api-aws.sigs.k8s.io/getting-started.html#initialize-the-management-cluster">Cluster API for AWS</a></li><li><a href="https://jicowan.medium.com/provisioning-an-eks-cluster-with-capi-df3502e5f2b4">Provisioning an EKS cluster with CAPI AWS</a></li></ul><h3>Try out Cilium</h3><ul><li><a href="https://isovalent.com/resource-library/labs/">Try out Cilium</a> and get a first-hand experience of how it solves some real problems and use-cases in your cloud-native or on-prem environments related to Networking, Security or Observability.</li></ul><h3>🌟Conclusion 🌟</h3><p>In this post, I introduced what is Cluster API and explained why you can use this useful tool for managing multiple Kubernetes clusters instead of struggling with different APIs and tool sets to maintain them. Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e73dcdf44459" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/clusterapi-provider-for-aws-and-cilium-e73dcdf44459">ClusterAPI Provider for AWS and Cilium</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cilium & Enhanced Networking with Intel 82599 VI]]></title>
            <link>https://awstip.com/cilium-enhanced-networking-with-intel-82599-vi-bf7688b9615e?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf7688b9615e</guid>
            <category><![CDATA[cilium]]></category>
            <category><![CDATA[enhanced-networking]]></category>
            <category><![CDATA[intel]]></category>
            <category><![CDATA[sriov]]></category>
            <category><![CDATA[virtual-function]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Fri, 25 Apr 2025 05:34:10 GMT</pubDate>
            <atom:updated>2025-07-21T15:03:37.108Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cilium &amp; Enhanced Networking with Intel 82599 VF in EKS</h3><h3>☸ ️Introduction</h3><p>Enhanced networking uses single root I/O virtualization (SR-IOV) to provide high-performance networking capabilities on supported instance types. SR-IOV is a method of device virtualization that provides higher I/O performance and lower CPU utilization when compared to traditional virtualized network interfaces. Enhanced networking provides higher bandwidth, higher packet per second (PPS) performance, and consistently lower latency between instances. There is no additional charge for using enhanced networking.</p><p>The Intel 82599 Virtual Function interface supports network speeds of up to 10 Gbps for supported instance types. The following instance types use the Intel 82599 VF interface for enhanced networking: C3, C4, D2, I2, M4 (excluding m4.16xlarge), and R3.</p><p>From a Cilium perspective we create a cluster with accelerated networking which means the physical interface is the VF device/driver. All this is transparent to Cilium and it will attach its programs to that netdevice like any other devices.</p><h3>🎯Goals &amp; Objectives</h3><p>In this article you will learn how to install Cilium on an EKS cluster with Intel 82599 VF. The test below was done with d2.8xlarge, and Cilium was installed in ENI to ensure it can claim support for it. Subsequently, Cilium Connectivity tests were done to validate that traffic and other tests also passed.</p><h3>What is SR-IOV?</h3><p>The single root I/O virtualization (SR-IOV) interface is an extension to the PCI Express (PCIe) specification. SR-IOV allows a device, such as a network adapter, to separate access to its resources among various PCIe hardware functions. These functions consist of the following types:</p><ul><li><strong>A PCIe Physical Function (PF)</strong>. This function is the primary function of the device and advertises the device’s SR-IOV capabilities. The PF is associated with the Hyper-V parent partition in a virtualized environment.</li><li><strong>One or more PCIe Virtual Functions (VFs)</strong>. Each VF is associated with the device’s PF. A VF shares one or more physical resources of the device, such as a memory and a network port, with the PF and other VFs on the device. Each VF is associated with a Hyper-V child partition in a virtualized environment.</li><li><strong>Hyper-V Extensible Switch Module</strong>- The extensible switch module that configures the NIC switch on the SR-IOV network adapter to provide network connectivity to the Hyper-V child partitions. If the child partitions are connected to a PCI Express (PCIe) Virtual Function (VF), the extensible switch module does not participate in data traffic between the VM and the network adapter. Instead, data traffic is passed directly between the VM and the VF to which it is attached.</li><li><strong>PF Miniport Driver</strong>- The PF miniport driver is responsible for managing resources on the network adapter that are used by one or more VFs. Because of this, the PF miniport driver is loaded in the management operating system before any resources are allocated for a VF. The PF miniport driver is halted after all resources that were allocated for VFs are freed.</li><li><strong>VF Miniport Driver</strong>- The VF miniport driver is installed in the VM to manage the VF. Any operation that is performed by the VF miniport driver must not affect any other VF or the PF on the same network adapter.</li><li><strong>Network Interface Card (NIC) Switch</strong>- The NIC switch is a hardware component of the network adapter that supports the SR-IOV interface. The NIC switch forwards network traffic between the physical port on the adapter and internal virtual ports (VPorts). Each VPort is attached to either the PF or a VF.</li><li><strong>Virtual Ports (VPorts)</strong>- A VPort is a data object that represents an internal port on the NIC switch of a network adapter that supports the SR-IOV interface. Similar to a port on a physical switch, a VPort on the NIC switch delivers packets to and from a PF or VF to which the port is attached.</li><li><strong>Physical Port</strong>- The physical port is a hardware component of the network adapter that supports the SR-IOV interface. The physical port provides the interface on the adapter to the external networking medium.</li></ul><p>Each PF and VF is assigned a unique PCI Express Requester ID (RID) that allows an I/O memory management unit (IOMMU) to differentiate between different traffic streams and apply memory and interrupt translations between the PF and VFs. This allows traffic streams to be delivered directly to the appropriate Hyper-V parent or child partition. As a result, nonprivileged data traffic flows from the PF to VF without affecting other VFs.</p><p>SR-IOV enables network traffic to bypass the software switch layer of the Hyper-V virtualization stack. Because the VF is assigned to a child partition, the network traffic flows directly between the VF and child partition. As a result, the I/O overhead in the software emulation layer is diminished and achieves network performance that is nearly the same performance as in non-virtualized environments.</p><h3>Good to Know</h3><ul><li>If your PPS rate reached its ceiling, then you probably reached the upper limits of the virtual network interface driver. Move to enhanced networking.</li><li>If your throughput is near or exceeding 20 K PPS on the VIF driver, then it’s a best practice to use enhanced networking.</li><li>Use a cluster <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html">placement group</a> to provide the lowest latency and highest PPS network performance for your instances.</li><li>To reach speeds up to 10 Gbps between instances, launch your instances in a cluster placement group with the enhanced networking instance type. These instance types are placed physically close to each other. Instance types that are close to each other further reduces latency and improves transfer speeds.</li><li>To reach speeds up to 25 Gbps between instances, launch your instances in a cluster placement group with ENA compatible instances. Then, make sure that traffic has multiple flows between the instances.</li></ul><h3>Pre-Requisites</h3><ul><li>You should have an <a href="https://portal.aws.amazon.com/billing/signup?pg=premsprice&amp;cta=herobtn&amp;redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start/email">AWS subscription</a>.</li><li>Install <a href="https://kubernetes.io/releases/download/#kubectl">kubectl</a></li><li>Install <a href="https://helm.sh/docs/intro/install/">Helm</a></li><li>The following <a href="https://docs.cilium.io/en/v1.13/network/concepts/ipam/eni/#required-privileges">EC2 privileges</a> are required by the Cilium operator in order to perform ENI creation and IP allocation.</li><li>Install <a href="https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html">eksctl</a></li><li>Install <a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html">awscli</a></li><li>Cilium CLI: Cilium provides <a href="https://docs.cilium.io/en/stable/gettingstarted/k8s-install-default/#install-the-cilium-cli">Cilium CLI</a> tool that automatically collects all the logs and debug information needed to troubleshoot your Cilium installation. You can install Cilium CLI for Linux, macOS, or other distributions on their local machine(s) or server(s).</li></ul><h3>Lets’ get going</h3><ul><li>Create an EKS cluster with d2.8xlarge as the instance type that supports Intel 82599 VF Interface for enhanced Networking.</li><li>This is supported only on Nitro-based instances.</li><li>How to check which Nitro instance provides how much I/O?</li></ul><pre>aws ec2 describe-instance-types --filters &quot;Name=instance-type,Values=d2.*&quot; --query &quot;InstanceTypes[].[InstanceType, NetworkInfo.NetworkPerformance, NetworkInfo.NetworkCards[0]  .BaselineBandwidthInGbps] | sort_by(@,&amp;[2])&quot; --output table<br>--------------------------------------<br>|        DescribeInstanceTypes       |<br>+-------------+--------------+-------+<br>|  d2.xlarge  |  Moderate    |  1.25 |<br>|  d2.2xlarge |  High        |  2.5  |<br>|  d2.4xlarge |  High        |  5.0  |<br>|  d2.8xlarge |  10 Gigabit  |  10.0 |<br>+-------------+--------------+-------+</pre><ul><li>Sample clusterconfig.yaml file</li></ul><pre>apiVersion: eksctl.io/v1alpha5<br>kind: ClusterConfig<br>metadata:<br>     name: cluster2<br>     region: ap-northeast-1<br>     version: &quot;1.29&quot;<br>managedNodeGroups:<br>   - name: ng-1<br>     iam:<br>        attachPolicyARNs:<br>          - arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy<br>          - arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy<br>          - arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly<br>          - arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore<br>     desiredCapacity: 2<br>     privateNetworking: true<br>     instanceType: d2.8xlarge<br>     # taint nodes so that application pods are<br>     # not scheduled/executed until Cilium is deployed.<br>     # Alternatively, see the note below.<br>     taints:<br>       - key: &quot;node.cilium.io/agent-not-ready&quot;<br>         value: &quot;true&quot;<br>         effect: &quot;NoExecute&quot;</pre><ul><li>With the EKS cluster up and running, ensure that the ixgbevf module is loaded in this example. This instance has enhanced networking properly configured.</li></ul><pre>#kubectl-node_shell ip-192-168-157-96.ap-northeast-1.compute.internal<br>spawning &quot;nsenter-8begpt&quot; on &quot;ip-192-168-157-96.ap-northeast-1.compute.internal&quot;<br>If you don&#39;t see a command prompt, try pressing enter.<br>[root@ip-192-168-157-96 /]# ethtool -i eth0<br>driver: ixgbevf<br>version: 5.10.220-209.869.amzn2.x86_64<br>firmware-version:<br>expansion-rom-version:<br>bus-info: 0000:00:03.0<br>supports-statistics: yes<br>supports-test: yes<br>supports-eeprom-access: no<br>supports-register-dump: yes<br>supports-priv-flags: yes<br>[root@ip-192-168-157-96 /]#</pre><ul><li>Patch the AWS daemonset- In case of ENI mode, Cilium will manage ENIs instead of VPC CNI, so the aws-node DaemonSet has to be patched to prevent conflict behavior.</li></ul><pre>kubectl -n kube-system patch daemonset aws-node --type=&#39;strategic&#39; -p=&#39;{&quot;spec&quot;:{&quot;template&quot;:{&quot;spec&quot;:{&quot;nodeSelector&quot;:{&quot;io.cilium/aws-node-enabled&quot;:&quot;true&quot;}}}}}&#39;</pre><ul><li>Install Cilium in ENI mode</li></ul><pre>helm install cilium cilium/cilium --version 1.15.8 \\<br>  --namespace kube-system \\<br>  --set eni.enabled=true \\<br>  --set ipam.mode=eni \\<br>  --set egressMasqueradeInterfaces=eth0 \\<br>  --set routingMode=native</pre><ul><li>Make sure that all pods are up and running</li></ul><pre>NAMESPACE     NAME                              READY   STATUS    RESTARTS   AGE     IP                NODE                                                 NOMINATED NODE   READINESS GATES<br>kube-system   cilium-hpzgl                      1/1     Running   0          95s     192.168.189.113   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-79f7468c6-hgmk9   1/1     Running   0          94s     192.168.157.96    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-79f7468c6-klmhl   1/1     Running   0          94s     192.168.189.113   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-txr7m                      1/1     Running   0          95s     192.168.157.96    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-676bf68468-r79jj          1/1     Running   0          13m     192.168.134.142   ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-676bf68468-wjndv          1/1     Running   0          13m     192.168.154.221   ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-b7sdq                  1/1     Running   0          9m22s   192.168.157.96    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-zs8kg                  1/1     Running   0          9m19s   192.168.189.113   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;</pre><ul><li>Run cilium connectivity test(s) and make sure that all pods are up and running</li></ul><pre>NAMESPACE       NAME                               READY   STATUS    RESTARTS   AGE     IP                NODE                                                 NOMINATED NODE   READINESS GATES<br>cilium-test-1   client-d48766cfd-f4n94             1/1     Running   0          82m     192.168.187.228   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>cilium-test-1   client2-6b89df6c77-rgs9n           1/1     Running   0          82m     192.168.164.34    ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>cilium-test-1   client3-7f986c467b-n5rzl           1/1     Running   0          82m     192.168.146.208   ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>cilium-test-1   echo-other-node-5fcb9f9c65-tmk7b   2/2     Running   0          82m     192.168.144.75    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>cilium-test-1   echo-same-node-6bbbcd7755-wsnf8    2/2     Running   0          82m     192.168.166.0     ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>cilium-test-1   host-netns-ptn5m                   1/1     Running   0          82m     192.168.157.96    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>cilium-test-1   host-netns-wfv9z                   1/1     Running   0          82m     192.168.189.113   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>cilium-test     client-d48766cfd-6t9zj             1/1     Running   0          89m     192.168.186.252   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>cilium-test     client2-6b89df6c77-xrwl5           1/1     Running   0          89m     192.168.165.60    ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>cilium-test     client3-7f986c467b-bfz97           1/1     Running   0          89m     192.168.130.128   ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>cilium-test     echo-other-node-5d67f9786b-d6mrg   2/2     Running   0          89m     192.168.154.235   ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>cilium-test     echo-same-node-6698bd45b-dxvjs     2/2     Running   0          89m     192.168.168.72    ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>cilium-test     host-netns-4gzjp                   1/1     Running   0          89m     192.168.189.113   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>cilium-test     host-netns-brxmp                   1/1     Running   0          89m     192.168.157.96    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>default         nsenter-8begpt                     1/1     Running   0          5m48s   192.168.157.96    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system     cilium-hpzgl                       1/1     Running   0          91m     192.168.189.113   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system     cilium-operator-79f7468c6-hgmk9    1/1     Running   0          91m     192.168.157.96    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system     cilium-operator-79f7468c6-klmhl    1/1     Running   0          91m     192.168.189.113   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system     cilium-txr7m                       1/1     Running   0          91m     192.168.157.96    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system     coredns-676bf68468-r79jj           1/1     Running   0          102m    192.168.134.142   ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system     coredns-676bf68468-wjndv           1/1     Running   0          102m    192.168.154.221   ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system     kube-proxy-b7sdq                   1/1     Running   0          99m     192.168.157.96    ip-192-168-157-96.ap-northeast-1.compute.internal    &lt;none&gt;           &lt;none&gt;<br>kube-system     kube-proxy-zs8kg                   1/1     Running   0          99m     192.168.189.113   ip-192-168-189-113.ap-northeast-1.compute.internal   &lt;none&gt;           &lt;none&gt;</pre><pre>[amitgag@CSCO-W-PF4HSB9A aws ]$ cilium connectivity test --force-deploy<br>ℹ️  Monitor aggregation detected, will skip some flow validation steps<br>🔥 [cluster2.ap-northeast-1.eksctl.io] Deleting connectivity check deployments...<br>✨ [cluster2.ap-northeast-1.eksctl.io] Creating namespace cilium-test-1 for connectivity check...<br>✨ [cluster2.ap-northeast-1.eksctl.io] Deploying echo-same-node service...<br>✨ [cluster2.ap-northeast-1.eksctl.io] Deploying DNS test server configmap...<br>✨ [cluster2.ap-northeast-1.eksctl.io] Deploying same-node deployment...<br>✨ [cluster2.ap-northeast-1.eksctl.io] Deploying client deployment...<br>✨ [cluster2.ap-northeast-1.eksctl.io] Deploying client2 deployment...<br>✨ [cluster2.ap-northeast-1.eksctl.io] Deploying client3 deployment...<br>✨ [cluster2.ap-northeast-1.eksctl.io] Deploying echo-other-node service...<br>✨ [cluster2.ap-northeast-1.eksctl.io] Deploying other-node deployment...<br>✨ [host-netns] Deploying cluster2.ap-northeast-1.eksctl.io daemonset...<br>✨ [host-netns-non-cilium] Deploying cluster2.ap-northeast-1.eksctl.io daemonset...<br>ℹ️  Skipping tests that require a node Without Cilium<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for deployment cilium-test-1/client to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for deployment cilium-test-1/client2 to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for deployment cilium-test-1/echo-same-node to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for deployment cilium-test-1/client3 to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for deployment cilium-test-1/echo-other-node to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for pod cilium-test-1/client3-7f986c467b-n5rzl to reach DNS server on cilium-test-1/echo-same-node-6bbbcd7755-wsnf8 pod...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for pod cilium-test-1/client-d48766cfd-f4n94 to reach DNS server on cilium-test-1/echo-same-node-6bbbcd7755-wsnf8 pod...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for pod cilium-test-1/client2-6b89df6c77-rgs9n to reach DNS server on cilium-test-1/echo-same-node-6bbbcd7755-wsnf8 pod...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for pod cilium-test-1/client-d48766cfd-f4n94 to reach DNS server on cilium-test-1/echo-other-node-5fcb9f9c65-tmk7b pod...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for pod cilium-test-1/client2-6b89df6c77-rgs9n to reach DNS server on cilium-test-1/echo-other-node-5fcb9f9c65-tmk7b pod...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for pod cilium-test-1/client3-7f986c467b-n5rzl to reach DNS server on cilium-test-1/echo-other-node-5fcb9f9c65-tmk7b pod...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for pod cilium-test-1/client-d48766cfd-f4n94 to reach default/kubernetes service...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for pod cilium-test-1/client2-6b89df6c77-rgs9n to reach default/kubernetes service...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for pod cilium-test-1/client3-7f986c467b-n5rzl to reach default/kubernetes service...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for Service cilium-test-1/echo-other-node to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for Service cilium-test-1/echo-other-node to be synchronized by Cilium pod kube-system/cilium-txr7m<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for Service cilium-test-1/echo-other-node to be synchronized by Cilium pod kube-system/cilium-hpzgl<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for Service cilium-test-1/echo-same-node to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for Service cilium-test-1/echo-same-node to be synchronized by Cilium pod kube-system/cilium-txr7m<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for Service cilium-test-1/echo-same-node to be synchronized by Cilium pod kube-system/cilium-hpzgl<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for NodePort 192.168.157.96:31410 (cilium-test-1/echo-other-node) to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for NodePort 192.168.157.96:32050 (cilium-test-1/echo-same-node) to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for NodePort 192.168.189.113:31410 (cilium-test-1/echo-other-node) to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for NodePort 192.168.189.113:32050 (cilium-test-1/echo-same-node) to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for DaemonSet cilium-test-1/host-netns-non-cilium to become ready...<br>⌛ [cluster2.ap-northeast-1.eksctl.io] Waiting for DaemonSet cilium-test-1/host-netns to become ready...<br>ℹ️  Skipping IPCache check<br>🔭 Enabling Hubble telescope...<br>⚠️  Unable to contact Hubble Relay, disabling Hubble telescope and flow validation: rpc error: code = Unavailable desc = connection error: desc = &quot;transport: Error while dialing: dial tcp 127.0.0.1:4245: connect: connection refused&quot;<br>ℹ️  Expose Relay locally with:<br>   cilium hubble enable<br>   cilium hubble port-forward&amp;<br>ℹ️  Cilium version: 1.15.8<br>🏃[cilium-test-1] Running 86 tests ...<br>................<br>✅ [cilium-test-1] All 48 tests (465 actions) successful, 38 tests skipped, 1 scenarios skipped.</pre><h3>Cloudwatch agent metrics (Optional)</h3><ul><li>Ensure that the cluster and node group IAM role has <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-iam-roles-for-cloudwatch-agent-commandline.html">permissions</a> for CloudWatch agent.</li><li>Install the Cloud Watch Agent on the EC2 worker nodes.</li><li>Cloud Watch can also be enabled as an add-on from the EKS console or CLI but it doesn’t have any metrics.</li></ul><pre>sudo yum install amazon-cloudwatch-agent</pre><ul><li>Configure the <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-network-performance.html">Cloud Watch agent</a> with the following contents</li></ul><pre>vi /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json</pre><pre>{<br>    &quot;agent&quot;: {<br>        &quot;metrics_collection_interval&quot;: 10,<br>        &quot;logfile&quot;: &quot;/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log&quot;<br>      },<br>    &quot;metrics&quot;: {<br>        &quot;namespace&quot;: &quot;MyCustomNamespace&quot;,<br>        &quot;append_dimensions&quot;: {<br>         &quot;InstanceId&quot;: &quot;${aws:InstanceId}&quot;<br>    },<br>    &quot;metrics_collected&quot;: {<br>      &quot;ethtool&quot;: {<br>        &quot;interface_include&quot;: [<br>          &quot;eth0&quot;<br>        ],<br>        &quot;metrics_include&quot;: [<br>          &quot;rx_packets&quot;,<br>          &quot;tx_packets&quot;,<br>          &quot;bw_in_allowance_exceeded&quot;,<br>          &quot;bw_out_allowance_exceeded&quot;,<br>          &quot;conntrack_allowance_exceeded&quot;,<br>          &quot;linklocal_allowance_exceeded&quot;,<br>          &quot;pps_allowance_exceeded&quot;<br>         ]<br>        }<br>      }<br>    }<br>  }</pre><ul><li>Restart the Cloud Watch Agent</li></ul><pre>sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json<br>****** processing amazon-cloudwatch-agent ******<br>I! Trying to detect region from ec2 D! [EC2] Found active network interface I! imds retry client will retry 1 timesSuccessfully fetched the config and saved in /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/file_amazon-cloudwatch-agent.json.tmp<br>Start configuration validation...<br>2024/08/26 06:26:59 Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/file_amazon-cloudwatch-agent.json.tmp ...<br>2024/08/26 06:26:59 I! Valid Json input schema.<br>2024/08/26 06:26:59 D! ec2tagger processor required because append_dimensions is set<br>2024/08/26 06:26:59 Configuration validation first phase succeeded<br>I! Detecting run_as_user...<br>I! Trying to detect region from ec2<br>D! [EC2] Found active network interface<br>I! imds retry client will retry 1 times<br>/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent -schematest -config /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml<br>Configuration validation second phase succeeded<br>Configuration validation succeeded<br>amazon-cloudwatch-agent has already been stopped</pre><h3>Identify which CPUs are affiliated with which NUMA nodes.</h3><p>NUMA gives you the power to optimize for workloads where the majority of requests for a particular block of memory come from one of the processors, and that block is “closer” (architecturally speaking) to one of the processors.</p><p>The basic output shows which vCPUs (labeled as “CPU”) belong to which NUMA nodes (and each NUMA node shares an L3 cache).</p><pre>[root@ip-192-168-144-213 amazon-cloudwatch-agent.d]# lscpu | grep NUMA<br>NUMA node(s):        2<br>NUMA node0 CPU(s):   0-8,18-26<br>NUMA node1 CPU(s):   9-17,27-35</pre><ul><li>You can observe the following metrics from the AWS Cloud Watch agent console for ixgbevf.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ePR_nBsT7aDXXaCxBPvBg.png" /></figure><h3>References</h3><ul><li><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sriov-networking.html">Enhanced Networking with Intel 82599 VF</a></li><li><a href="https://github.com/amzn/amzn-drivers/blob/master/kernel/linux/ena/ENA_Linux_Best_Practices.rst">AWS Best Practices</a></li><li><a href="https://cdrdv2-public.intel.com/321211/pci-sig-sr-iov-primer-sr-iov-technology-paper.pdf">SR-IOV Primer</a></li></ul><h3>Try out Cilium</h3><ul><li><a href="https://isovalent.com/resource-library/labs/">Try out Cilium</a> and get a first-hand experience of how it solves some real problems and use-cases in your cloud-native or on-prem environments related to Networking, Security or Observability.</li></ul><h3>🌟Conclusion 🌟</h3><p>Hopefully, this post gave you a good overview of how to install Cilium on an EKS cluster with Intel 82599 VF. Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf7688b9615e" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/cilium-enhanced-networking-with-intel-82599-vi-bf7688b9615e">Cilium &amp; Enhanced Networking with Intel 82599 VI</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cilium: Support for EFA drivers in EKS]]></title>
            <link>https://awstip.com/cilium-support-for-efa-drivers-in-eks-249987d043eb?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/249987d043eb</guid>
            <category><![CDATA[elastickubernetesservice]]></category>
            <category><![CDATA[cilium]]></category>
            <category><![CDATA[nccl]]></category>
            <category><![CDATA[nvidia-gpu]]></category>
            <category><![CDATA[high-performace-computing]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Mon, 21 Apr 2025 14:59:15 GMT</pubDate>
            <atom:updated>2025-07-21T15:03:25.486Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*cp3AtUs8109FN1KULoyfEQ.png" /><figcaption>Source-AWS</figcaption></figure><h3>☸ ️Introduction</h3><p>Elasticity is defined as “The ability to acquire resources as you need them and release resources when you no longer need them” — this is one of the biggest selling points of the cloud. In Amazon EC2 instances, Elastic Fabric Adapters (EFAs) are network devices that accelerate high-performance computing (HPC) and machine learning. EFAs are Elastic Network Adapters (ENAs) with additional OS-bypass capabilities. AWS Elastic Fabric Adapter (EFA) is a specialized network interface for Amazon EC2 instances that allows customers to run high levels of inter-instance communication, such as HPC applications on AWS at scale.</p><p>Some use cases for EFA are in weather modelling, semiconductor design, streaming a live sporting event, oil and gas simulations, genomics, finance, and engineering, amongst others.</p><h3>🎯Goals &amp; Objectives</h3><p>In this article you will learn how to install Cilium on an EKS cluster with the EFA adapter. The test below was done with g5.12xlarge, and Cilium was installed to ensure it can claim support for it. <a href="https://github.com/NVIDIA/nccl-tests">NCCL Tests</a> were run to evaluate the performance of the network using the Nvidia Collective Communication Library.</p><h3>What’s the difference between ENI, EFA, and ENA in AWS?</h3><ul><li><strong>Elastic Network Interface (ENI)</strong>: A virtual network interface for basic networking needs, including secondary IP addresses and security group attachment.</li><li><strong>Elastic Fabric Adapter (EFA)</strong>: Designed for high-performance computing (HPC) and machine learning applications, reducing latency for inter-instance communication.</li><li><strong>Elastic Network Adapter (ENA)</strong>: AWS’s standard for high-bandwidth networking, supporting enhanced networking features for optimized throughput.</li></ul><h3>Why EFA adapter?</h3><ul><li>Due to EFA’s support for libfabric APIs, applications using a supported MPI library can be easily migrated to AWS without having to make any changes to their existing code.</li><li>For this reason, AWS EFA is often used in conjunction with Cluster placement groups — which allow physical hosts to be placed much closer together within an AZ to decrease latency even more.</li><li>Elastic Fabric Adapter (EFA) is a network interface for Amazon EC2 instances that enables customers to run applications requiring high levels of inter-node communications at scale on AWS.</li><li>Its custom-built operating system (OS) bypass hardware interface enhances the performance of inter-instance communications, which is critical to scaling these applications.</li><li>With EFA, high-performance computing (HPC) applications using the message-passing interface (MPI) and machine learning (ML) applications using NVIDIA Collective Communications Library (NCCL) can scale to thousands of CPUs or GPUs.</li><li>As a result, you get the application performance of on-premises HPC clusters with the on-demand elasticity and flexibility of the AWS cloud.</li><li>EFA is an optional EC2 networking feature that can be enabled at no additional cost on any supported EC2 instance.</li></ul><h3>Supported interfaces and libraries</h3><p>EFAs support the following interfaces and libraries:</p><ul><li>Open MPI 4.1 and later</li><li>Intel MPI 2019 Update 5 and later</li><li>NVIDIA Collective Communications Library (NCCL) 2.4.2 and later</li><li>AWS Neuron SDK version 2.3 and later</li></ul><h3>EFA Limitations</h3><p>EFAs have the following limitations:</p><ul><li>All P4d and P5 instance types support NVIDIA GPUDirect Remote Direct Memory Access (RDMA).</li><li>EFA traffic between P4d/P4de/DL1 instances and other instance types is currently not supported.</li><li><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#network-cards">Instance types that support multiple network cards</a> can be configured with one EFA per network card. All other supported instance types support only one EFA per instance.</li><li>For c7g.16xlarge, m7g.16xlarge and r7g.16xlarge Dedicated Instances and Dedicated Hosts are not supported when an EFA is attached.</li><li>EFA OS-bypass traffic can’t cross Availability Zones, VPCs, or AWS accounts. In other words, EFA OS-bypass traffic can’t flow from one Availability Zone, VPC (with or without a VPC peering connection), or AWS account to another. This does not apply to normal IP traffic from the EFA.</li><li>EFA requires all nodes be in a single subnet</li></ul><pre>2024-09-12 22:35:07 [ℹ]  EFA requires all nodes be in a single subnet, arbitrarily choosing one: [subnet-0f4785c61fbdec025]</pre><ul><li>EFA OS-bypass traffic can’t be sent across subnets in a Local Zone.</li><li>EFA OS-bypass traffic is not routable. Normal IP traffic from the EFA remains routable.</li><li>The EFA must be a member of a security group that allows all inbound and outbound traffic to and from the security group itself.</li><li>EFA is not supported on Windows instances.</li><li>EFA is not supported on AWS <a href="https://docs.aws.amazon.com/outposts/index.html">Outposts</a>.</li><li>The tests below were done keeping in mind multi-GPU VM’s.</li></ul><h3>Let’s get going</h3><ul><li>Ensure that the requisite instances are available in your region. In this case, g5.12xlarge was chosen.</li></ul><pre>aws ec2 describe-instance-types  --region us-east-1  --filters Name=network-info.efa-supported,Values=true  --query &quot;InstanceTypes[*].[InstanceType]&quot;  --output text | sort</pre><ul><li>Sample clusterconfig.yaml file</li></ul><pre>apiVersion: eksctl.io/v1alpha5<br>kind: ClusterConfig<br>metadata:<br>  name: efa-cluster<br>  region: us-west-2<br>  version: &quot;1.29&quot;<br>iam:<br>  withOIDC: true<br>availabilityZones: [&quot;us-west-2a&quot;, &quot;us-west-2b&quot;, &quot;us-west-2c&quot;]<br>managedNodeGroups:<br>  - name: my-efa-ng<br>    iam:<br>        attachPolicyARNs:<br>          - arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy<br>          - arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy<br>          - arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly<br>          - arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore<br>    instanceType: g5.12xlarge<br>    minSize: 1<br>    desiredCapacity: 2<br>    maxSize: 2<br>    availabilityZones: [&quot;us-west-2b&quot;]<br>    volumeSize: 300<br>    privateNetworking: true<br>    efaEnabled: true<br>    # taint nodes so that application pods are<br>     # not scheduled/executed until Cilium is deployed.<br>     # Alternatively, see the note below.<br>    taints:<br>      - key: &quot;node.cilium.io/agent-not-ready&quot;<br>        value: &quot;true&quot;<br>        effect: &quot;NoExecute&quot;</pre><ul><li>Create an EKS cluster using the sample cluster_config.yaml</li></ul><pre>eksctl create cluster -f ./eks-config_efa.yaml</pre><ul><li>Notice that the EFA device plugin is now being automatically installed.</li></ul><pre>2024-09-09 15:46:43 [ℹ]  created &quot;kube-system:DaemonSet.apps/aws-efa-k8s-device-plugin-daemonset&quot;<br>2024-09-09 15:46:44 [ℹ]  as you have enabled EFA, the EFA device plugin was automatically installed.<br>2024-09-09 15:46:44 [▶]  completed task: install EFA device plugin</pre><ul><li>Patch the AWS daemonset- In case of ENI mode, Cilium will manage ENIs instead of VPC CNI, so the aws-node DaemonSet has to be patched to prevent conflict behavior.</li></ul><pre>kubectl -n kube-system patch daemonset aws-node --type=&#39;strategic&#39; -p=&#39;{&quot;spec&quot;:{&quot;template&quot;:{&quot;spec&quot;:{&quot;nodeSelector&quot;:{&quot;io.cilium/aws-node-enabled&quot;:&quot;true&quot;}}}}}&#39;</pre><ul><li>Install Cilium in ENI mode</li></ul><pre>helm install cilium cilium/cilium --version 1.15.8   --namespace kube-system   --set eni.enabled=true   --set ipam.mode=eni   --set egressMasqueradeInterfaces=eth0   --set routingMode=native</pre><ul><li>Check that the nodes and pods are Ready and in a healthy state.</li></ul><pre>kubectl get nodes -o wide<br>NAME                                          STATUS   ROLES    AGE   VERSION               INTERNAL-IP     EXTERNAL-IP   OS-IMAGE         KERNEL-VERSION                  CONTAINER-RUNTIME<br>ip-192-168-66-72.us-west-2.compute.internal   Ready    &lt;none&gt;   19m   v1.29.6-eks-1552ad0   192.168.66.72   &lt;none&gt;        Amazon Linux 2   5.10.223-212.873.amzn2.x86_64   containerd://1.7.11<br>ip-192-168-67-38.us-west-2.compute.internal   Ready    &lt;none&gt;   19m   v1.29.6-eks-1552ad0   192.168.67.38   &lt;none&gt;        Amazon Linux 2   5.10.223-212.873.amzn2.x86_64   containerd://1.7.11<br><br>kubectl get pods -o wide -A<br>NAMESPACE     NAME                                        READY   STATUS    RESTARTS   AGE   IP               NODE                                          NOMINATED NODE   READINESS GATES<br>kube-system   aws-efa-k8s-device-plugin-daemonset-jjlwb   1/1     Running   0          17m   192.168.67.38    ip-192-168-67-38.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   aws-efa-k8s-device-plugin-daemonset-vr76k   1/1     Running   0          17m   192.168.66.72    ip-192-168-66-72.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-9kbgf                                1/1     Running   0          15m   192.168.67.38    ip-192-168-67-38.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-kbcxt                                1/1     Running   0          15m   192.168.66.72    ip-192-168-66-72.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-c55d96f4c-6cr97             1/1     Running   0          15m   192.168.66.72    ip-192-168-66-72.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-c55d96f4c-n5hb4             1/1     Running   0          15m   192.168.67.38    ip-192-168-67-38.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5b8cc885bc-4vmt2                    1/1     Running   0          15m   192.168.89.100   ip-192-168-67-38.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5b8cc885bc-kf7tx                    1/1     Running   0          15m   192.168.88.68    ip-192-168-66-72.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-lrxp2                            1/1     Running   0          17m   192.168.66.72    ip-192-168-66-72.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-qts58                            1/1     Running   0          18m   192.168.67.38    ip-192-168-67-38.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;</pre><ul><li>The nodegroup template contains bootstrap to install EFA drivers in node. Confirm that the EFA drivers components were successfully installed,</li></ul><pre>[root@ip-192-168-144-49 /]# fi_info -p efa<br>provider: efa<br>    fabric: efa<br>    domain: rdmap0s26-rdm<br>    version: 122.0<br>    type: FI_EP_RDM<br>    protocol: FI_PROTO_EFA<br>provider: efa<br>    fabric: efa<br>    domain: rdmap0s26-dgrm<br>    version: 122.0<br>    type: FI_EP_DGRAM<br>    protocol: FI_PROTO_EFA</pre><ul><li>aws-efa-k8s-device-plugin-daemonsetpod logs should be similar to:</li></ul><pre>kubectl-stern efa ds/aws-efa-k8s-device-plugin-daemonset -n kube-system<br><br>+ efa-aws-efa-k8s-device-plugin-4kc9h › aws-efa-k8s-device-plugin<br>+ efa-aws-efa-k8s-device-plugin-vp978 › aws-efa-k8s-device-plugin<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Fetching EFA devices.<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:21:44 device: rdmap0s26,uverbs0,/sys/class/infiniband_verbs/uverbs0,/sys/class/infiniband/rdmap0s26<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:21:44 EFA Device list: [{rdmap0s26 uverbs0 /sys/class/infiniband_verbs/uverbs0 /sys/class/infiniband/rdmap0s26}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Starting FS watcher.<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Starting OS watcher.<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:21:44 device: rdmap0s26,uverbs0,/sys/class/infiniband_verbs/uverbs0,/sys/class/infiniband/rdmap0s26<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Starting to serve on /var/lib/kubelet/device-plugins/aws-efa-device-plugin.sock<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Registered device plugin with Kubelet<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:51:24 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:51:24 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:53:24 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:53:24 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:55:48 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:55:48 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:58:18 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:58:18 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:59:59 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 12:59:59 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 13:01:04 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 13:01:04 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 13:06:19 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 13:06:19 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 13:08:58 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 13:08:58 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 13:15:50 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-4kc9h aws-efa-k8s-device-plugin 2024/09/16 13:15:50 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Fetching EFA devices.<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:21:44 device: rdmap0s26,uverbs0,/sys/class/infiniband_verbs/uverbs0,/sys/class/infiniband/rdmap0s26<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:21:44 EFA Device list: [{rdmap0s26 uverbs0 /sys/class/infiniband_verbs/uverbs0 /sys/class/infiniband/rdmap0s26}]<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Starting FS watcher.<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Starting OS watcher.<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:21:44 device: rdmap0s26,uverbs0,/sys/class/infiniband_verbs/uverbs0,/sys/class/infiniband/rdmap0s26<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Starting to serve on /var/lib/kubelet/device-plugins/aws-efa-device-plugin.sock<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:21:44 Registered device plugin with Kubelet<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:51:24 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 12:51:24 Checking if device:`rdmap0s26` exists<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 13:15:50 Request IDs: [&amp;ContainerAllocateRequest{DevicesIDs:[rdmap0s26],}]<br>efa-aws-efa-k8s-device-plugin-vp978 aws-efa-k8s-device-plugin 2024/09/16 13:15:50 Checking if device:`rdmap0s26` exists</pre><ul><li>Cilium connectivity tests failed for 1 test with an error code as failed to obtain the eni link list, which most likely would be fixed by upgrading to <a href="https://github.com/cilium/cilium/issues/31974">Cilium 1.16</a>.</li></ul><pre>cilium connectivity test<br>ℹ️  Monitor aggregation detected, will skip some flow validation steps<br>✨ [efa-cluster.us-west-2.eksctl.io] Creating namespace cilium-test for connectivity check...<br>✨ [efa-cluster.us-west-2.eksctl.io] Deploying echo-same-node service...<br>✨ [efa-cluster.us-west-2.eksctl.io] Deploying DNS test server configmap...<br>✨ [efa-cluster.us-west-2.eksctl.io] Deploying same-node deployment...<br>✨ [efa-cluster.us-west-2.eksctl.io] Deploying client deployment...<br>✨ [efa-cluster.us-west-2.eksctl.io] Deploying client2 deployment...<br>✨ [efa-cluster.us-west-2.eksctl.io] Deploying client3 deployment...<br>✨ [efa-cluster.us-west-2.eksctl.io] Deploying echo-other-node service...<br>✨ [efa-cluster.us-west-2.eksctl.io] Deploying other-node deployment...<br>✨ [host-netns] Deploying efa-cluster.us-west-2.eksctl.io daemonset...<br>✨ [host-netns-non-cilium] Deploying efa-cluster.us-west-2.eksctl.io daemonset...<br>ℹ️  Skipping tests that require a node Without Cilium<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for deployment cilium-test/client to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for deployment cilium-test/client2 to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for deployment cilium-test/echo-same-node to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for deployment cilium-test/client3 to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for deployment cilium-test/echo-other-node to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for pod cilium-test/client-d48766cfd-wst2v to reach DNS server on cilium-test/echo-same-node-6698bd45b-225ss pod...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for pod cilium-test/client2-6b89df6c77-bzkgh to reach DNS server on cilium-test/echo-same-node-6698bd45b-225ss pod...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for pod cilium-test/client3-7f986c467b-gn6k5 to reach DNS server on cilium-test/echo-same-node-6698bd45b-225ss pod...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for pod cilium-test/client-d48766cfd-wst2v to reach DNS server on cilium-test/echo-other-node-5d67f9786b-fpc6b pod...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for pod cilium-test/client2-6b89df6c77-bzkgh to reach DNS server on cilium-test/echo-other-node-5d67f9786b-fpc6b pod...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for pod cilium-test/client3-7f986c467b-gn6k5 to reach DNS server on cilium-test/echo-other-node-5d67f9786b-fpc6b pod...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for pod cilium-test/client-d48766cfd-wst2v to reach default/kubernetes service...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for pod cilium-test/client2-6b89df6c77-bzkgh to reach default/kubernetes service...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for pod cilium-test/client3-7f986c467b-gn6k5 to reach default/kubernetes service...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for Service cilium-test/echo-other-node to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for Service cilium-test/echo-other-node to be synchronized by Cilium pod kube-system/cilium-9kbgf<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for Service cilium-test/echo-other-node to be synchronized by Cilium pod kube-system/cilium-kbcxt<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for Service cilium-test/echo-same-node to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for Service cilium-test/echo-same-node to be synchronized by Cilium pod kube-system/cilium-9kbgf<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for Service cilium-test/echo-same-node to be synchronized by Cilium pod kube-system/cilium-kbcxt<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for NodePort 192.168.67.38:32275 (cilium-test/echo-other-node) to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for NodePort 192.168.67.38:30519 (cilium-test/echo-same-node) to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for NodePort 192.168.66.72:32275 (cilium-test/echo-other-node) to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for NodePort 192.168.66.72:30519 (cilium-test/echo-same-node) to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for DaemonSet cilium-test/host-netns-non-cilium to become ready...<br>⌛ [efa-cluster.us-west-2.eksctl.io] Waiting for DaemonSet cilium-test/host-netns to become ready...<br>ℹ️  Skipping IPCache check<br>🔭 Enabling Hubble telescope...<br>⚠️  Unable to contact Hubble Relay, disabling Hubble telescope and flow validation: rpc error: code = Unavailable desc = connection error: desc = &quot;transport: Error while dialing: dial tcp 127.0.0.1:4245: connect: connection refused&quot;<br>ℹ️  Expose Relay locally with:<br>   cilium hubble enable<br>   cilium hubble port-forward&amp;<br>ℹ️  Cilium version: 1.15.8<br>🏃[cilium-test] Running 91 tests ...<br>[=] [cilium-test] Test [no-unexpected-packet-drops] [1/91]<br>..<br>[=] [cilium-test] Test [no-policies] [2/91]<br>.............................................<br>[=] [cilium-test] Skipping test [no-policies-from-outside] [3/91] (skipped by condition)<br>[=] [cilium-test] Test [no-policies-extra] [4/91]<br>............<br>[=] [cilium-test] Test [allow-all-except-world] [5/91]<br>........................<br>[=] [cilium-test] Test [client-ingress] [6/91]<br>......<br>[=] [cilium-test] Test [client-ingress-knp] [7/91]<br>......<br>[=] [cilium-test] Test [allow-all-with-metrics-check] [8/91]<br>......<br>[=] [cilium-test] Test [all-ingress-deny] [9/91]<br>............<br>[=] [cilium-test] Skipping test [all-ingress-deny-from-outside] [10/91] (skipped by condition)<br>[=] [cilium-test] Test [all-ingress-deny-knp] [11/91]<br>............<br>[=] [cilium-test] Test [all-egress-deny] [12/91]<br>........................<br>[=] [cilium-test] Test [all-egress-deny-knp] [13/91]<br>........................<br>[=] [cilium-test] Test [all-entities-deny] [14/91]<br>............<br>[=] [cilium-test] Test [cluster-entity] [15/91]<br>...<br>[=] [cilium-test] Skipping test [cluster-entity-multi-cluster] [16/91] (skipped by condition)<br>[=] [cilium-test] Test [host-entity-egress] [17/91]<br>......<br>[=] [cilium-test] Test [host-entity-ingress] [18/91]<br>....<br>[=] [cilium-test] Test [echo-ingress] [19/91]<br>......<br>[=] [cilium-test] Skipping test [echo-ingress-from-outside] [20/91] (skipped by condition)<br>[=] [cilium-test] Test [echo-ingress-knp] [21/91]<br>......<br>[=] [cilium-test] Test [client-ingress-icmp] [22/91]<br>......<br>[=] [cilium-test] Test [client-egress] [23/91]<br>......<br>[=] [cilium-test] Test [client-egress-knp] [24/91]<br>......<br>[=] [cilium-test] Test [client-egress-expression] [25/91]<br>......<br>[=] [cilium-test] Test [client-egress-expression-knp] [26/91]<br>......<br>[=] [cilium-test] Test [client-with-service-account-egress-to-echo] [27/91]<br>......<br>[=] [cilium-test] Test [client-egress-to-echo-service-account] [28/91]<br>......<br>[=] [cilium-test] Test [to-entities-world] [29/91]<br>.........<br>[=] [cilium-test] Test [to-cidr-external] [30/91]<br>......<br>[=] [cilium-test] Test [to-cidr-external-knp] [31/91]<br>......<br>[=] [cilium-test] Skipping test [from-cidr-host-netns] [32/91] (skipped by condition)<br>[=] [cilium-test] Test [echo-ingress-from-other-client-deny] [33/91]<br>..........<br>[=] [cilium-test] Test [client-ingress-from-other-client-icmp-deny] [34/91]<br>............<br>[=] [cilium-test] Test [client-egress-to-echo-deny] [35/91]<br>............<br>[=] [cilium-test] Test [client-ingress-to-echo-named-port-deny] [36/91]<br>....<br>[=] [cilium-test] Test [client-egress-to-echo-expression-deny] [37/91]<br>....<br>[=] [cilium-test] Test [client-with-service-account-egress-to-echo-deny] [38/91]<br>....<br>[=] [cilium-test] Test [client-egress-to-echo-service-account-deny] [39/91]<br>..<br>[=] [cilium-test] Test [client-egress-to-cidr-deny] [40/91]<br>......<br>[=] [cilium-test] Test [client-egress-to-cidr-deny-default] [41/91]<br>......<br>[=] [cilium-test] Skipping test [clustermesh-endpointslice-sync] [42/91] (skipped by condition)<br>[=] [cilium-test] Test [health] [43/91]<br>..<br>[=] [cilium-test] Skipping test [north-south-loadbalancing] [44/91] (Feature node-without-cilium is disabled)<br>[=] [cilium-test] Test [pod-to-pod-encryption] [45/91]<br>.<br>[=] [cilium-test] Skipping test [pod-to-pod-with-l7-policy-encryption] [46/91] (requires Feature encryption-pod mode wireguard, got disabled)<br>[=] [cilium-test] Test [node-to-node-encryption] [47/91]<br>...<br>[=] [cilium-test] Skipping test [egress-gateway-with-l7-policy] [50/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [egress-gateway] [48/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [egress-gateway-excluded-cidrs] [49/91] (Feature enable-ipv4-egress-gateway is disabled)<br>[=] [cilium-test] Skipping test [pod-to-node-cidrpolicy] [51/91] (Feature cidr-match-nodes is disabled)<br>[=] [cilium-test] Skipping test [north-south-loadbalancing-with-l7-policy] [52/91] (Feature node-without-cilium is disabled)<br>[=] [cilium-test] Test [echo-ingress-l7] [53/91]<br>..................<br>[=] [cilium-test] Test [echo-ingress-l7-named-port] [54/91]<br>..................<br>[=] [cilium-test] Test [client-egress-l7-method] [55/91]<br>..................<br>[=] [cilium-test] Test [client-egress-l7] [56/91]<br>...............<br>[=] [cilium-test] Test [client-egress-l7-named-port] [57/91]<br>...............<br>[=] [cilium-test] Skipping test [client-egress-l7-tls-deny-without-headers] [58/91] (Feature secret-backend-k8s is disabled)<br>[=] [cilium-test] Skipping test [client-egress-l7-tls-headers] [59/91] (Feature secret-backend-k8s is disabled)<br>[=] [cilium-test] Skipping test [client-egress-l7-set-header] [60/91] (Feature secret-backend-k8s is disabled)<br>[=] [cilium-test] Skipping test [echo-ingress-auth-always-fail] [61/91] (Feature mutual-auth-spiffe is disabled)<br>[=] [cilium-test] Skipping test [echo-ingress-mutual-auth-spiffe] [62/91] (Feature mutual-auth-spiffe is disabled)<br>[=] [cilium-test] Skipping test [pod-to-ingress-service] [63/91] (Feature ingress-controller is disabled)<br>[=] [cilium-test] Skipping test [pod-to-ingress-service-deny-all] [64/91] (Feature ingress-controller is disabled)<br>[=] [cilium-test] Skipping test [pod-to-ingress-service-deny-ingress-identity] [65/91] (Feature ingress-controller is disabled)<br>[=] [cilium-test] Skipping test [pod-to-ingress-service-deny-backend-service] [66/91] (Feature ingress-controller is disabled)<br>[=] [cilium-test] Skipping test [pod-to-ingress-service-allow-ingress-identity] [67/91] (Feature ingress-controller is disabled)<br>[=] [cilium-test] Skipping test [outside-to-ingress-service] [68/91] (Feature ingress-controller is disabled)<br>[=] [cilium-test] Skipping test [outside-to-ingress-service-deny-world-identity] [69/91] (Feature ingress-controller is disabled)<br>[=] [cilium-test] Skipping test [outside-to-ingress-service-deny-cidr] [70/91] (Feature ingress-controller is disabled)<br>[=] [cilium-test] Skipping test [outside-to-ingress-service-deny-all-ingress] [71/91] (Feature ingress-controller is disabled)<br>[=] [cilium-test] Test [dns-only] [72/91]<br>...............<br>[=] [cilium-test] Test [to-fqdns] [73/91]<br>............<br>[=] [cilium-test] Skipping test [pod-to-controlplane-host] [74/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [pod-to-k8s-on-controlplane] [75/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [pod-to-controlplane-host-cidr] [76/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [pod-to-k8s-on-controlplane-cidr] [77/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [local-redirect-policy] [78/91] (Feature enable-local-redirect-policy is disabled)<br>[=] [cilium-test] Test [pod-to-pod-no-frag] [79/91]<br>.<br>[=] [cilium-test] Skipping test [multicast-igmpv2-check] [85/91] (Feature multicast is disabled)<br>[=] [cilium-test] Skipping test [bgp-control-plane-v2] [81/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [host-firewall-ingress] [82/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [host-firewall-egress] [83/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [cilium-dns-proxy-ha] [84/91] (Feature cilium-dnsproxy-ha is disabled)<br>[=] [cilium-test] Skipping test [bgp-control-plane-v1] [80/91] (skipped by condition)<br>[=] [cilium-test] Skipping test [enterprise-bgp-control-plane-v2] [88/91] (Feature enable-enterprise-bgp-control-plane is disabled)<br>[=] [cilium-test] Skipping test [multicast-igmpv3-check] [86/91] (Feature multicast is disabled)<br>[=] [cilium-test] Skipping test [multicast-connectivity] [87/91] (Feature multicast is disabled)<br>[=] [cilium-test] Skipping test [bfd-standalone] [89/91] (Feature enable-bfd is disabled)<br>[=] [cilium-test] Skipping test [bfd-bgp] [90/91] (Feature enable-bfd is disabled)<br>[=] [cilium-test] Test [check-log-errors] [91/91]<br>.<br>  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-9kbgf (config)]<br>  [-] Scenario [check-log-errors/no-errors-in-logs]<br>  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-9kbgf (cilium-agent)]<br>  ❌ Found 1 logs in efa-cluster.us-west-2.eksctl.io/kube-system/cilium-9kbgf (cilium-agent) matching list of errors that must be investigated:<br>time=&quot;2024-09-09T11:55:40Z&quot; level=error msg=&quot;failed to obtain eni link list&quot; error=&quot;interrupted system call&quot; subsys=ipam (1 occurrences)<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-9kbgf (mount-cgroup)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-9kbgf (apply-sysctl-overwrites)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-9kbgf (mount-bpf-fs)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-9kbgf (clean-cilium-state)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-9kbgf (install-cni-binaries)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-kbcxt (cilium-agent)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-kbcxt (config)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-kbcxt (mount-cgroup)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-kbcxt (apply-sysctl-overwrites)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-kbcxt (mount-bpf-fs)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-kbcxt (clean-cilium-state)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-kbcxt (install-cni-binaries)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-operator-c55d96f4c-6cr97 (cilium-operator)]<br>.  [.] Action [check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-operator-c55d96f4c-n5hb4 (cilium-operator)]<br>.<br>📋 Test Report [cilium-test]<br>❌ 1/48 tests failed (1/467 actions), 43 tests skipped, 1 scenarios skipped:<br>Test [check-log-errors]:<br>  ❌ check-log-errors/no-errors-in-logs/efa-cluster.us-west-2.eksctl.io/kube-system/cilium-9kbgf (cilium-agent)<br>[cilium-test] 1 tests failed</pre><h3>Install NVIDIA device plugin</h3><p>The NVIDIA Collective Communications Library (NCCL) is a library of standard collective communication routines for multiple GPUs across a single node or multiple nodes. NCCL can be used together with EFA, Libfabric, and MPI to support various machine learning workloads.</p><ul><li>Install the NVIDIA device plugin and make sure that all pods are up and running.</li></ul><pre>kubectl apply -f &lt;https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/v0.14.3/nvidia-device-plugin.yml&gt;</pre><pre>kubectl get pods -o wide -A<br><br>NAMESPACE     NAME                                        READY   STATUS    RESTARTS      AGE   IP               NODE                                           NOMINATED NODE   READINESS GATES<br>kube-system   aws-efa-k8s-device-plugin-daemonset-48nms   1/1     Running   0             25m   192.168.91.236   ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   aws-efa-k8s-device-plugin-daemonset-r2p2g   1/1     Running   0             25m   192.168.74.213   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-cvt6q                                1/1     Running   0             17m   192.168.91.236   ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-c55d96f4c-hf7x7             1/1     Running   3 (15m ago)   17m   192.168.91.236   ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-c55d96f4c-hjw9j             1/1     Running   3 (16m ago)   17m   192.168.74.213   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-pjm9z                                1/1     Running   0             17m   192.168.74.213   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5b8cc885bc-8ltgd                    1/1     Running   0             17m   192.168.90.131   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5b8cc885bc-cn425                    1/1     Running   0             17m   192.168.94.57    ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-6fz6m                            1/1     Running   0             26m   192.168.74.213   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-6ttdr                            1/1     Running   0             27m   192.168.91.236   ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   nvidia-device-plugin-daemonset-26tb6        1/1     Running   0             22s   192.168.92.125   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   nvidia-device-plugin-daemonset-mtnjv        1/1     Running   0             22s   192.168.71.71    ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;</pre><h3>Install the EFA device plugin</h3><ul><li>Add the helm repo and install the EFA device plugin.</li></ul><pre>helm repo add eks &lt;https://aws.github.io/eks-charts&gt;<br><br>helm install efa eks/aws-efa-k8s-device-plugin -n kube-system</pre><ul><li>Check the status of the daemonset</li></ul><pre>kubectl get ds -A<br>NAMESPACE     NAME                                  DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR                     AGE<br>kube-system   aws-efa-k8s-device-plugin-daemonset   2         2         2       2            2           &lt;none&gt;                            34m<br>kube-system   aws-node                              0         0         0       0            0           io.cilium/aws-node-enabled=true   41m<br>kube-system   cilium                                2         2         2       2            2           kubernetes.io/os=linux            26m<br>kube-system   kube-proxy                            2         2         2       2            2           &lt;none&gt;                            41m<br>kube-system   nvidia-device-plugin-daemonset        2         2         2       2            2           &lt;none&gt;                            8m52s</pre><h3>Install MPI operator</h3><ul><li>Create a clusterrole-mpi-operator.yaml file</li></ul><pre>apiVersion: rbac.authorization.k8s.io/v1<br>kind: ClusterRole<br>metadata:<br>  labels:<br>    app: mpi-operator<br>    app.kubernetes.io/component: mpijob<br>    app.kubernetes.io/name: mpi-operator<br>    kustomize.component: mpi-operator<br>  name: mpi-operator<br>rules:<br>- apiGroups:<br>  - &quot;&quot;<br>  resources:<br>  - configmaps<br>  - secrets<br>  - services<br>  verbs:<br>  - create<br>  - list<br>  - watch<br>  - update<br>- apiGroups:<br>  - &quot;&quot;<br>  resources:<br>  - pods<br>  verbs:<br>  - create<br>  - get<br>  - list<br>  - watch<br>  - delete<br>  - update<br>  - patch<br>- apiGroups:<br>  - &quot;&quot;<br>  resources:<br>  - pods/exec<br>  verbs:<br>  - create<br>- apiGroups:<br>  - &quot;&quot;<br>  resources:<br>  - endpoints<br>  verbs:<br>  - create<br>  - get<br>  - update<br>- apiGroups:<br>  - &quot;&quot;<br>  resources:<br>  - events<br>  verbs:<br>  - create<br>  - patch<br>- apiGroups:<br>  - apps<br>  resources:<br>  - statefulsets<br>  verbs:<br>  - create<br>  - list<br>  - update<br>  - watch<br>- apiGroups:<br>  - batch<br>  resources:<br>  - jobs<br>  verbs:<br>  - create<br>  - list<br>  - update<br>  - watch<br>- apiGroups:<br>  - apiextensions.k8s.io<br>  resources:<br>  - customresourcedefinitions<br>  verbs:<br>  - create<br>  - get<br>- apiGroups:<br>  - kubeflow.org<br>  resources:<br>  - mpijobs<br>  - mpijobs/finalizers<br>  - mpijobs/status<br>  verbs:<br>  - &#39;*&#39;<br>- apiGroups:<br>  - scheduling.incubator.k8s.io<br>  - scheduling.sigs.dev<br>  resources:<br>  - queues<br>  - podgroups<br>  verbs:<br>  - &#39;*&#39;<br>- apiGroups:<br>  - coordination.k8s.io<br>  resources:<br>  - leases<br>  verbs:<br>  - get<br>  - create<br>  - delete<br>  - update<br>- apiGroups:<br>  - scheduling.k8s.io<br>  resources:<br>  - priorityclasses<br>  verbs:<br>  - list<br>  - watch<br>  - get<br>  - create<br>  - delete<br>  - update</pre><ul><li>Deploy the mpi-operator</li></ul><pre>kubectl apply -f clusterrole-mpi-operator.yaml<br>namespace/mpi-operator created<br>customresourcedefinition.apiextensions.k8s.io/mpijobs.kubeflow.org created<br>serviceaccount/mpi-operator created<br>clusterrole.rbac.authorization.k8s.io/kubeflow-mpijobs-admin created<br>clusterrole.rbac.authorization.k8s.io/kubeflow-mpijobs-edit created<br>clusterrole.rbac.authorization.k8s.io/kubeflow-mpijobs-view created<br>clusterrole.rbac.authorization.k8s.io/mpi-operator created<br>clusterrolebinding.rbac.authorization.k8s.io/mpi-operator created<br>deployment.apps/mpi-operator created</pre><ul><li>Check the status of the pods</li></ul><pre>kubectl get pods -A -o wide<br>NAMESPACE      NAME                                        READY   STATUS    RESTARTS      AGE   IP               NODE                                           NOMINATED NODE   READINESS GATES<br>kube-system    aws-efa-k8s-device-plugin-daemonset-48nms   1/1     Running   0             39m   192.168.91.236   ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    aws-efa-k8s-device-plugin-daemonset-r2p2g   1/1     Running   0             39m   192.168.74.213   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    cilium-cvt6q                                1/1     Running   0             31m   192.168.91.236   ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    cilium-operator-c55d96f4c-hf7x7             1/1     Running   3 (29m ago)   31m   192.168.91.236   ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    cilium-operator-c55d96f4c-hjw9j             1/1     Running   3 (29m ago)   31m   192.168.74.213   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    cilium-pjm9z                                1/1     Running   0             31m   192.168.74.213   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    coredns-5b8cc885bc-8ltgd                    1/1     Running   0             30m   192.168.90.131   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    coredns-5b8cc885bc-cn425                    1/1     Running   0             30m   192.168.94.57    ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    kube-proxy-6fz6m                            1/1     Running   0             40m   192.168.74.213   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    kube-proxy-6ttdr                            1/1     Running   0             41m   192.168.91.236   ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    nvidia-device-plugin-daemonset-26tb6        1/1     Running   0             13m   192.168.92.125   ip-192-168-74-213.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system    nvidia-device-plugin-daemonset-mtnjv        1/1     Running   0             13m   192.168.71.71    ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;<br>mpi-operator   mpi-operator-7477b5bdbd-6ccdd               1/1     Running   0             42s   192.168.67.252   ip-192-168-91-236.us-west-2.compute.internal   &lt;none&gt;           &lt;none&gt;</pre><ul><li>Add lease permissions for the mpi-operator cluster role.</li></ul><pre>kubectl apply -f ./clusterrole-mpi-operator.yaml<br>clusterrole.rbac.authorization.k8s.io/mpi-operator configured</pre><h3>Build container image to run tests on EKS</h3><ul><li>Make sure you have <a href="https://docs.docker.com/engine/install/">docker desktop or docker</a> on your machine from where you are building the image.</li><li>Clone the <a href="https://github.com/aws-samples/awsome-distributed-training/tree/main/micro-benchmarks/nccl-tests">repo</a>.</li><li>To run the NCCL tests on EKS, you must build the container image and then push it to a container registry, such as the private <a href="https://aws.amazon.com/ecr/">ECR</a> in your AWS account.</li></ul><pre>EFA_INSTALLER_VERSION=1.33.0<br>AWS_OFI_NCCL_VERSION=v1.9.2-aws<br>NCCL_VERSION=v2.21.5-1<br>NCCL_TESTS_VERSION=v2.13.9<br>ECR_REPOSITORY_NAME=&quot;nccl-tests&quot;<br>TAG=&quot;${EFA_INSTALLER_VERSION}-${AWS_OFI_NCCL_VERSION}-${NCCL_VERSION}-${NCCL_TESTS_VERSION}&quot;<br><br>aws ecr create-repository --repository-name ${ECR_REPOSITORY_NAME}<br>{<br>    &quot;repository&quot;: {<br>        &quot;repositoryArn&quot;: &quot;arn:aws:ecr:ap-northeast-2:#################:repository/nccl-tests&quot;,<br>        &quot;registryId&quot;: &quot;#################&quot;,<br>        &quot;repositoryName&quot;: &quot;nccl-tests&quot;,<br>        &quot;repositoryUri&quot;: &quot;#################.dkr.ecr.ap-northeast-2.amazonaws.com/nccl-tests&quot;,<br>        &quot;createdAt&quot;: &quot;2024-09-11T20:41:01.443000+05:30&quot;,<br>        &quot;imageTagMutability&quot;: &quot;MUTABLE&quot;,<br>        &quot;imageScanningConfiguration&quot;: {<br>            &quot;scanOnPush&quot;: false<br>        },<br>        &quot;encryptionConfiguration&quot;: {<br>            &quot;encryptionType&quot;: &quot;AES256&quot;<br>        }<br>    }<br>}</pre><ul><li>Get the ECR repository URI.</li></ul><pre>REPO_URI=`aws ecr describe-repositories --query repositories[].[repositoryUri] | grep &quot;/${ECR_REPOSITORY_NAME}&quot; | tr -d &#39;&quot;&#39; | xargs`<br>ECR_URI=${REPO_URI%&quot;/${ECR_REPOSITORY_NAME}&quot;}</pre><ul><li>Build the container image</li></ul><pre>docker image build -t ${REPO_URI}:${TAG} -f ./nccl-tests.Dockerfile .</pre><ul><li>Once the container image is built, you can check if it is present with docker images. You should see an output similar to this one:</li></ul><p><strong>Note- the build time takes roughly 45 minutes</strong></p><pre>docker image build -t ${REPO_URI}:${TAG} -f ./nccl-tests.Dockerfile .<br>[+] Building 2676.2s (20/20) FINISHED                                                                                      docker:default<br> =&gt; [internal] load build definition from nccl-tests.Dockerfile                                                                      0.0s<br> =&gt; =&gt; transferring dockerfile: 5.09kB                                                                                               0.0s<br> =&gt; [internal] load metadata for docker.io/nvidia/cuda:12.2.2-devel-ubuntu22.04                                                      2.3s<br> =&gt; [auth] nvidia/cuda:pull token for registry-1.docker.io                                                                           0.0s<br> =&gt; [internal] load .dockerignore                                                                                                    0.0s<br> =&gt; =&gt; transferring context: 2B                                                                                                      0.0s<br> =&gt; CACHED [ 1/15] FROM docker.io/nvidia/cuda:12.2.2-devel-ubuntu22.04@sha256:#####################################################  0.0s<br> =&gt; [ 2/15] RUN apt-get update -y &amp;&amp; apt-get upgrade -y                                                                             65.5s<br> =&gt; [ 3/15] RUN apt-get remove -y --allow-change-held-packages     ibverbs-utils     libibverbs-dev     libibverbs1     libmlx5-1    1.7s<br> =&gt; [ 4/15] RUN rm -rf /opt/hpcx     &amp;&amp; rm -rf /usr/local/mpi     &amp;&amp; rm -f /etc/ld.so.conf.d/hpcx.conf     &amp;&amp; ldconfig               0.4s<br> =&gt; [ 5/15] RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated     apt-utils     autoconf     automake   80.9s<br> =&gt; [ 6/15] RUN mkdir -p /var/run/sshd                                                                                               0.3s<br> =&gt; [ 7/15] RUN sed -i &#39;s/[ #]\\(.*StrictHostKeyChecking \\).*/ \\1no/g&#39; /etc/ssh/ssh_config &amp;&amp;     echo &quot;    UserKnownHostsFile /dev/  0.5s<br> =&gt; [ 8/15] RUN curl &lt;https://bootstrap.pypa.io/get-pip.py&gt; -o /tmp/get-pip.py     &amp;&amp; python3 /tmp/get-pip.py     &amp;&amp; pip3 install aw  17.4s<br> =&gt; [ 9/15] RUN git clone -b v2.4.1 &lt;https://github.com/NVIDIA/gdrcopy.git&gt; /tmp/gdrcopy     &amp;&amp; cd /tmp/gdrcopy     &amp;&amp; make prefix=/o  8.9s<br> =&gt; [10/15] RUN cd $HOME     &amp;&amp; curl -O &lt;https://efa-installer.amazonaws.com/aws-efa-installer-1.34.0.tar.gz&gt;     &amp;&amp; tar -xf $HOME/  320.3s<br> =&gt; [11/15] RUN git clone -b v2.22.3-1 &lt;https://github.com/NVIDIA/nccl.git&gt;  /opt/nccl     &amp;&amp; cd /opt/nccl     &amp;&amp; make -j $(nproc)  2090.2s<br> =&gt; [12/15] RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libhwloc-dev                                                       5.4s<br> =&gt; [13/15] RUN curl -OL &lt;https://github.com/aws/aws-ofi-nccl/releases/download/${AWS_OFI_NCCL_VERSION}/aws-ofi-nccl-$&gt;{AWS_OFI_NCCL  11.3s<br> =&gt; [14/15] RUN git clone -b v2.13.10 &lt;https://github.com/NVIDIA/nccl-tests.git&gt; /opt/nccl-tests     &amp;&amp; cd /opt/nccl-tests     &amp;&amp; ma  60.5s<br> =&gt; [15/15] RUN rm -rf /var/lib/apt/lists/*                                                                                          0.5s<br> =&gt; exporting to image                                                                                                               9.9s<br> =&gt; =&gt; exporting layers                                                                                                              9.9s<br> =&gt; =&gt; writing image sha256:#####################################################                                         0.0s<br> =&gt; =&gt; naming to #################.dkr.ecr.ap-northeast-2.amazonaws.com/nccl-tests:1.33.0-v1.9.2-aws-v2.21.5-1-v2.13.9                    0.0s</pre><ul><li>Login to the container registry</li></ul><pre>aws ecr get-login-password | docker login --username AWS --password-stdin ${ECR_URI}</pre><ul><li>Push the container image to the registry</li></ul><pre>docker image push ${REPO_URI}:${TAG}<br>The push refers to repository [#################.dkr.ecr.ap-northeast-2.amazonaws.com/nccl-tests]<br>241a8f2bba5c: Pushed<br>f03edb2c7a13: Pushed<br>7dcd97951db5: Pushed<br>679e0c0bc4db: Pushed<br>b45de17a8545: Pushed<br>62620982ee29: Pushed<br>a6195e5acb78: Pushed<br>84c22d0d520d: Pushed<br>d87b84cc71be: Pushed<br>80c4373d8c6e: Pushed<br>7f19e87b6573: Pushed<br>b8006e828af3: Pushed<br>0f8e361ccf92: Pushed<br>401c0edfce5a: Pushed<br>679cc72df930: Pushed<br>216b978392cf: Pushed<br>598c4c0e7d71: Pushed<br>97da79745aa1: Pushed<br>4deb6be00699: Pushed<br>bd4791c0dfbe: Pushed<br>d3e5eae7a625: Pushed<br>adf2c0a553e9: Pushed<br>77b174470c94: Pushed<br>c735aeb4de50: Pushed<br>256d88da4185: Pushed<br>1.33.0-v1.9.2-aws-v2.21.5-1-v2.13.9: digest: sha256:##################################################### size: 5578</pre><h3>Run NCCL tests</h3><p><a href="https://github.com/NVIDIA/nccl-tests">NCCL Tests</a> enable you to evaluate the performance of the network using the Nvidia Collective Communication Library. This test case contains a Docker file and scripts to submit NCCL tests on Slurm or <a href="https://aws.amazon.com/eks/">Amazon EKS</a>.</p><ul><li>Verify the number of GPU’s on each node</li></ul><pre>kubectl describe nodes  |  tr -d &#39;\\000&#39; | sed -n -e &#39;/^Name/,/Roles/p&#39; -e &#39;/^Capacity/,/Allocatable/p&#39; -e &#39;/^Allocated resources/,/Events/p&#39;  | grep -e Name  -e  nvidia.com  | perl -pe &#39;s/\\n//&#39;  |  perl -pe &#39;s/Name:/\\n/g&#39; | sed &#39;s/nvidia.com\\/gpu:\\?//g&#39;  | sed &#39;1s/^/Node Available(GPUs)  Used(GPUs)/&#39; | sed &#39;s/$/ 0 0 0/&#39;  | awk &#39;{print $1, $2, $3}&#39;  | column -t<br>Node                                          Available(GPUs)  Used(GPUs)<br>ip-192-168-144-49.us-west-2.compute.internal  4                0<br>ip-192-168-151-36.us-west-2.compute.internal  4                0</pre><ul><li>Apply the MPIJob manifest to the cluster</li></ul><pre>apiVersion: kubeflow.org/v2beta1<br>kind: MPIJob<br>metadata:<br>  name: test-nccl<br>spec:<br>  runPolicy:<br>    cleanPodPolicy: Running<br>    backoffLimit: 20<br>  slotsPerWorker: 1<br>  mpiReplicaSpecs:<br>    Launcher:<br>      replicas: 1<br>      template:<br>         spec:<br>          restartPolicy: OnFailure<br>          containers:<br>          - image: #################.dkr.ecr.ap-northeast-2.amazonaws.com/nccl-tests:1.33.0-v1.9.2-aws-v2.21.5-1-v2.13.9<br>            imagePullPolicy: IfNotPresent<br>            name: test-nccl-launcher<br>            env:<br>             - name: LD_LIBRARY_PATH<br>               value: /opt/amazon/openmpi/lib:/opt/nccl/build/lib:/opt/amazon/efa/lib:/opt/aws-ofi-nccl/install/lib:/usr/local/nvidia/lib:$LD_LIBRARY_PATH<br>             - name: PATH<br>               value: $PATH:/opt/amazon/efa/bin:/usr/bin<br>            command:<br>            - /opt/amazon/openmpi/bin/mpirun<br>            - --allow-run-as-root<br>            - --tag-output<br>            - -np<br>            - &quot;1&quot;<br>            - -N<br>            - &quot;1&quot;<br>            - --bind-to<br>            - none<br>            - -x<br>            - PATH<br>            - -x<br>            - LD_LIBRARY_PATH<br>            - -x<br>            - FI_PROVIDER=efa<br>            - -x<br>          # - FI_EFA_USE_DEVICE_RDMA=1<br>          # - -x<br>            - FI_EFA_FORK_SAFE=1<br>            - -x<br>            - NCCL_DEBUG=INFO<br>            - -x<br>            - NCCL_BUFFSIZE=8388608<br>            - -x<br>            - NCCL_P2P_NET_CHUNKSIZE=524288<br>            - --mca<br>            - pml<br>            - ^cm,ucx<br>            - --mca<br>            - btl<br>            - tcp,self<br>            - --mca<br>            - btl_tcp_if_exclude<br>            - lo,docker0,veth_def_agent<br>            - /opt/nccl-tests/build/all_reduce_perf<br>            - -b<br>            - &quot;1&quot;<br>            - -e<br>            - &quot;16G&quot;<br>            - -f<br>            - &quot;2&quot;<br>            - -g<br>            - &quot;1&quot;<br>            - -c<br>            - &quot;1&quot;<br>            - -n<br>            - &quot;100&quot;<br>    Worker:<br>      replicas: 2<br>      template:<br>        spec:<br>          nodeSelector:<br>            node.kubernetes.io/instance-type: &quot;g5.12xlarge&quot;<br>          containers:<br>          - image: #################.dkr.ecr.ap-northeast-2.amazonaws.com/nccl-tests:1.33.0-v1.9.2-aws-v2.21.5-1-v2.13.9<br>            imagePullPolicy: IfNotPresent<br>            name: test-nccl-worker<br>            volumeMounts:<br>            - name: shmem<br>              mountPath: /dev/shm<br>            resources:<br>              limits:<br>                nvidia.com/gpu: 1<br>                hugepages-2Mi: 5120Mi<br>                vpc.amazonaws.com/efa: 1<br>                memory: 8000Mi<br>              requests:<br>                nvidia.com/gpu: 1<br>                hugepages-2Mi: 5120Mi<br>                vpc.amazonaws.com/efa: 1<br>                memory: 8000Mi<br>          volumes:<br>          - name: shmem<br>            hostPath:<br>              path: /dev/shm</pre><pre>kubectl apply -f nccl-tests.yaml</pre><p><strong>Note- the nccl-tests.yaml file from the repo didn’t work and hence made some changes to it.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cR4kF-1Kp5S8OrTRyYEtmQ.png" /></figure><ul><li>The following is an example excerpt from the logs of a NCCL all_reduce_perf test, executed on a cluster with two g5.12xlarge instances :</li></ul><pre>kubectl logs -f $(kubectl get pods | grep launcher | cut -d &#39; &#39; -f 1)<br>Warning: Permanently added &#39;test-nccl-worker-1.test-nccl.default.svc&#39; (ED25519) to the list of known hosts.<br>Warning: Permanently added &#39;test-nccl-worker-0.test-nccl.default.svc&#39; (ED25519) to the list of known hosts.<br>[1,0]&lt;stdout&gt;:# nThread 1 nGpus 1 minBytes 1 maxBytes 2147483648 step: 2(factor) warmup iters: 5 iters: 100 agg iters: 1 validation: 1 graph: 0<br>[1,0]&lt;stdout&gt;:#<br>[1,0]&lt;stdout&gt;:# Using devices<br>[1,0]&lt;stdout&gt;:#  Rank  0 Group  0 Pid     21 on test-nccl-worker-0 device  0 [0x00] NVIDIA A10G<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:21 [0] NCCL INFO Bootstrap : Using eth0:192.168.148.137&lt;0&gt;<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:21 [0] NCCL INFO cudaDriverVersion 12040<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:21 [0] NCCL INFO NCCL version 2.22.3+cuda12.2<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/Plugin: Failed to find ncclCollNetPlugin_v8 symbol.<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/Plugin: Failed to find ncclCollNetPlugin symbol (&gt;= v5). ncclCollNetPlugin symbols v4 and lower are not supported.<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Initializing aws-ofi-nccl 1.11.0-aws<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Using Libfabric version 1.22<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Using CUDA driver version 12040<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Configuring AWS-specific options<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Setting NCCL_NVLSTREE_MAX_CHUNKSIZE to 512KiB<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Setting NCCL_NVLS_CHUNKSIZE to 512KiB<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Internode latency set at 150.0 us<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Creating one domain per process<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Using transport protocol SENDRECV<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Selected Provider is efa (found 1 nics)<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Could not disable CUDA API usage for HMEM, disabling GDR<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Setting FI_OPT_EFA_SENDRECV_IN_ORDER_ALIGNED_128_BYTES not supported.<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Setting NCCL_PROTO to &quot;simple&quot;<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Global registrations supported<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Using network AWS Libfabric<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO ncclCommInitRank comm 0x55c4c398fed0 rank 0 nranks 1 cudaDev 0 nvmlDev 0 busId 1e0 commId 0x957c4f4bad7eaafa - Init START<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NET/OFI Global registrations supported<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO comm 0x55c4c398fed0 rank 0 nRanks 1 nNodes 1 localRanks 1 localRank 0 MNNVL 0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 00/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 01/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 02/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 03/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 04/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 05/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 06/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 07/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 08/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 09/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 10/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 11/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 12/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 13/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 14/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 15/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 16/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 17/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 18/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 19/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 20/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 21/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 22/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 23/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 24/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 25/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 26/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 27/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 28/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 29/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 30/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Channel 31/32 :    0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Trees [0] -1/-1/-1-&gt;0-&gt;-1 [1] -1/-1/-1-&gt;0-&gt;-1 [2] -1/-1/-1-&gt;0-&gt;-1 [3] -1/-1/-1-&gt;0-&gt;-1 [4] -1/-1/-1-&gt;0-&gt;-1 [5] -1/-1/-1-&gt;0-&gt;-1 [6] -1/-1/-1-&gt;0-&gt;-1 [7] -1/-1/-1-&gt;0-&gt;-1 [8] -1/-1/-1-&gt;0-&gt;-1 [9] -1/-1/-1-&gt;0-&gt;-1 [10] -1/-1/-1-&gt;0-&gt;-1 [11] -1/-1/-1-&gt;0-&gt;-1 [12] -1/-1/-1-&gt;0-&gt;-1 [13] -1/-1/-1-&gt;0-&gt;-1 [14] -1/-1/-1-&gt;0-&gt;-1 [15] -1/-1/-1-&gt;0-&gt;-1 [16] -1/-1/-1-&gt;0-&gt;-1 [17] -1/-1/-1-&gt;0-&gt;-1 [18] -1/-1/-1-&gt;0-&gt;-1 [19] -1/-1/-1-&gt;0-&gt;-1 [20] -1/-1/-1-&gt;0-&gt;-1 [21] -1/-1/-1-&gt;0-&gt;-1 [22] -1/-1/-1-&gt;0-&gt;-1 [23] -1/-1/-1-&gt;0-&gt;-1 [24] -1/-1/-1-&gt;0-&gt;-1 [25] -1/-1/-1-&gt;0-&gt;-1 [26] -1/-1/-1-&gt;0-&gt;-1 [27] -1/-1/-1-&gt;0-&gt;-1 [28] -1/-1/-1-&gt;0-&gt;-1 [29] -1/-1/-1-&gt;0-&gt;-1 [30] -1/-1/-1-&gt;0-&gt;-1 [31] -1/-1/-1-&gt;0-&gt;-1<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO NCCL_BUFFSIZE set by environment to 8388608.<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO P2P Chunksize set to 131072<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO 32 coll channels, 32 collnet channels, 0 nvls channels, 32 p2p channels, 32 p2p channels per peer<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO CC Off, Multi-GPU CC Off, workFifoBytes 1048576<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO TUNER/Plugin: Failed to find ncclTunerPlugin_v3 symbol.<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO TUNER/Plugin: Failed to find ncclTunerPlugin_v2 symbol, using internal tuner instead.<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO ncclCommInitRank comm 0x55c4c398fed0 rank 0 nranks 1 cudaDev 0 nvmlDev 0 busId 1e0 commId 0x957c4f4bad7eaafa - Init COMPLETE<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:28 [0] NCCL INFO Init timings: rank 0 nranks 1 total 0.17 (kernels 0.12, bootstrap 0.03, allgathers 0.00, topo 0.00, graphs 0.00, connections 0.02, rest 0.00)<br>[1,0]&lt;stdout&gt;:#<br>[1,0]&lt;stdout&gt;:#                                                              out-of-place                       in-place<br>[1,0]&lt;stdout&gt;:#       size         count      type   redop    root     time   algbw   busbw #wrong     time   algbw   busbw #wrong<br>[1,0]&lt;stdout&gt;:#        (B)    (elements)                               (us)  (GB/s)  (GB/s)            (us)  (GB/s)  (GB/s)<br>[1,0]&lt;stdout&gt;:           0             0     float     sum      -1     0.11    0.00    0.00      0     0.10    0.00    0.00      0<br>[1,0]&lt;stdout&gt;:           0             0     float     sum      -1     0.10    0.00    0.00      0     0.10    0.00    0.00      0<br>[1,0]&lt;stdout&gt;:           4             1     float     sum      -1     3.54    0.00    0.00      0     0.11    0.03    0.00      0<br>[1,0]&lt;stdout&gt;:           8             2     float     sum      -1     3.51    0.00    0.00      0     0.11    0.07    0.00      0<br>[1,0]&lt;stdout&gt;:          16             4     float     sum      -1     3.53    0.00    0.00      0     0.11    0.14    0.00      0<br>[1,0]&lt;stdout&gt;:          32             8     float     sum      -1     3.48    0.01    0.00      0     0.12    0.28    0.00      0<br>[1,0]&lt;stdout&gt;:          64            16     float     sum      -1     3.62    0.02    0.00      0     0.12    0.55    0.00      0<br>[1,0]&lt;stdout&gt;:         128            32     float     sum      -1     3.50    0.04    0.00      0     0.12    1.11    0.00      0<br>[1,0]&lt;stdout&gt;:         256            64     float     sum      -1     3.50    0.07    0.00      0     0.12    2.22    0.00      0<br>[1,0]&lt;stdout&gt;:         512           128     float     sum      -1     3.50    0.15    0.00      0     0.12    4.42    0.00      0<br>[1,0]&lt;stdout&gt;:        1024           256     float     sum      -1     3.49    0.29    0.00      0     0.11    9.01    0.00      0<br>[1,0]&lt;stdout&gt;:        2048           512     float     sum      -1     3.51    0.58    0.00      0     0.11   17.95    0.00      0<br>[1,0]&lt;stdout&gt;:        4096          1024     float     sum      -1     3.49    1.18    0.00      0     0.11   35.96    0.00      0<br>[1,0]&lt;stdout&gt;:        8192          2048     float     sum      -1     3.53    2.32    0.00      0     0.12   70.86    0.00      0<br>[1,0]&lt;stdout&gt;:       16384          4096     float     sum      -1     3.49    4.70    0.00      0     0.11  143.72    0.00      0<br>[1,0]&lt;stdout&gt;:       32768          8192     float     sum      -1     3.57    9.18    0.00      0     0.12  282.73    0.00      0<br>[1,0]&lt;stdout&gt;:       65536         16384     float     sum      -1     3.58   18.30    0.00      0     0.12  565.45    0.00      0<br>[1,0]&lt;stdout&gt;:      131072         32768     float     sum      -1     3.52   37.19    0.00      0     0.12  1129.93    0.00      0<br>[1,0]&lt;stdout&gt;:      262144         65536     float     sum      -1     3.58   73.13    0.00      0     0.12  2267.68    0.00      0<br>[1,0]&lt;stdout&gt;:      524288        131072     float     sum      -1     4.18  125.28    0.00      0     0.12  4534.97    0.00      0<br>[1,0]&lt;stdout&gt;:     1048576        262144     float     sum      -1     6.48  161.76    0.00      0     0.13  8236.40    0.00      0<br>[1,0]&lt;stdout&gt;:     2097152        524288     float     sum      -1    11.21  187.15    0.00      0     0.12  18092.93    0.00      0<br>[1,0]&lt;stdout&gt;:     4194304       1048576     float     sum      -1    21.11  198.71    0.00      0     0.12  36314.32    0.00      0<br>[1,0]&lt;stdout&gt;:     8388608       2097152     float     sum      -1    38.56  217.57    0.00      0     0.12  72817.78    0.00      0<br>[1,0]&lt;stdout&gt;:    16777216       4194304     float     sum      -1    72.82  230.40    0.00      0     0.12  145006.19    0.00      0<br>[1,0]&lt;stdout&gt;:    33554432       8388608     float     sum      -1    141.3  237.54    0.00      0     0.12  289262.34    0.00      0<br>[1,0]&lt;stdout&gt;:    67108864      16777216     float     sum      -1    278.1  241.31    0.00      0     0.12  580024.75    0.00      0<br>[1,0]&lt;stdout&gt;:   134217728      33554432     float     sum      -1    552.0  243.15    0.00      0     0.12  1157049.38    0.00      0<br>[1,0]&lt;stdout&gt;:   268435456      67108864     float     sum      -1   1099.5  244.14    0.00      0     0.12  2296086.36    0.00      0<br>[1,0]&lt;stdout&gt;:   536870912     134217728     float     sum      -1   2194.7  244.62    0.00      0     0.12  4600436.26    0.00      0<br>[1,0]&lt;stdout&gt;:  1073741824     268435456     float     sum      -1   4376.7  245.33    0.00      0     0.12  9240463.20    0.00      0<br>[1,0]&lt;stdout&gt;:  2147483648     536870912     float     sum      -1   8741.9  245.65    0.00      0     0.12  18401745.06    0.00      0<br>[1,0]&lt;stdout&gt;:test-nccl-worker-0:21:21 [0] NCCL INFO comm 0x55c4c398fed0 rank 0 nranks 1 cudaDev 0 busId 1e0 - Destroy COMPLETE</pre><h3>References</h3><ul><li><a href="https://aws.amazon.com/hpc/efa/">https://aws.amazon.com/hpc/efa/</a></li><li><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html#efa-instance-types">https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html#efa-instance-types</a></li><li><a href="https://docs.aws.amazon.com/eks/latest/userguide/node-efa.html">https://docs.aws.amazon.com/eks/latest/userguide/node-efa.html</a></li><li><a href="https://github.com/NVIDIA/nccl-tests">https://github.com/NVIDIA/nccl-tests</a></li><li><a href="https://github.com/aws-samples/aws-efa-eks">https://github.com/aws-samples/aws-efa-eks</a></li><li><a href="https://github.com/aws-samples/aws-efa-eks/blob/main/examples/simple/nccl-efa-tests.yaml">https://github.com/aws-samples/aws-efa-eks/blob/main/examples/simple/nccl-efa-tests.yaml</a></li><li><a href="https://github.com/aws-samples/awsome-distributed-training/tree/main/micro-benchmarks/nccl-tests">https://github.com/aws-samples/awsome-distributed-training/tree/main/micro-benchmarks/nccl-tests</a></li><li><a href="https://aws.amazon.com/ec2/instance-types/g5/">https://aws.amazon.com/ec2/instance-types/g5/</a></li><li><a href="https://github.com/aws-samples/aws-do-eks/blob/main/Container-Root/eks/deployment/nvidia-device-plugin/deploy.sh">https://github.com/aws-samples/aws-do-eks/blob/main/Container-Root/eks/deployment/nvidia-device-plugin/deploy.sh</a></li><li><a href="https://github.com/aws-samples/aws-do-eks/blob/main/Container-Root/eks/deployment/efa-device-plugin/deploy.sh">https://github.com/aws-samples/aws-do-eks/blob/main/Container-Root/eks/deployment/efa-device-plugin/deploy.sh</a></li><li><a href="https://github.com/aws-samples/aws-do-eks/blob/main/Container-Root/eks/deployment/kubeflow/mpi-operator/clusterrole-mpi-operator.yaml">https://github.com/aws-samples/aws-do-eks/blob/main/Container-Root/eks/deployment/kubeflow/mpi-operator/clusterrole-mpi-operator.yaml</a></li></ul><h3>Try out Cilium</h3><ul><li><a href="https://isovalent.com/resource-library/labs/">Try out Cilium</a> and get a first-hand experience of how it solves some real problems and use-cases in your cloud-native or on-prem environments related to Networking, Security or Observability.</li></ul><h3>🌟Conclusion 🌟</h3><p>Hopefully, this post gave you a good overview how to install Cilium on an EKS cluster with the EFA adapter and run <a href="https://github.com/NVIDIA/nccl-tests">NCCL Tests</a> to evaluate the performance of the network using the Nvidia Collective Communication Library.</p><p>Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=249987d043eb" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/cilium-support-for-efa-drivers-in-eks-249987d043eb">Cilium: Support for EFA drivers in EKS</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cilium: IPv6 in EKS]]></title>
            <link>https://awstip.com/cilium-ipv6-in-eks-e1fe7735feff?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1fe7735feff</guid>
            <category><![CDATA[ipv6]]></category>
            <category><![CDATA[cilium]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[elastickubernetesservice]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 11:40:54 GMT</pubDate>
            <atom:updated>2025-07-21T15:03:19.488Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cilium: IPv6 on EKS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M1ktgkPjACUuKTsNrRCYyA.png" /></figure><h3>🎯Goals &amp; Objectives</h3><p>In this article you will create an EKS cluster with IPv6 and use CNI <a href="https://docs.cilium.io/en/v1.15/installation/cni-chaining-aws-cni/#chaining-aws-cni">chaining </a>to demonstrate features like Prefix Delegation, Network Policy (L3/L4/L7/DNS), Encryption &amp; Observability.</p><p><strong><em>Note</em></strong>-</p><ul><li>Prefix Delegation for IPv6 in ENI mode in Cilium is under <a href="https://github.com/cilium/cilium/pull/32352">development</a>.</li><li>This feature is not documented yet, do not use it in production, and test at your own risk. The behavior of this feature may vary until the time it gets to General Availability.</li></ul><h3>What is Prefix Delegation?</h3><p>You can assign a private IPv4 or IPv6 CIDR range, either automatically or manually, to your network interfaces. By assigning prefixes, you scale and simplify the management of applications, including container and networking applications that require multiple IP addresses on an instance.</p><p>Assigning prefixes has the following benefits:</p><ul><li><strong>Increased IP addresses on a network interface</strong> — When you use a prefix, you assign a block of IP addresses as opposed to individual IP addresses. This increases the number of IP addresses for a network interface.</li><li><strong>Simplified VPC management for containers </strong>— In container applications, each container requires a unique IP address. Assigning prefixes to your instance simplifies the management of your VPCs, as you can launch and terminate containers without having to call Amazon EC2 APIs for individual IP assignments.</li></ul><h3>What is Chaining Mode in Cilium for EKS?</h3><p>In this hybrid mode, the AWS VPC CNI plugin is responsible for setting up the virtual network devices as well as for IP address management (IPAM) via ENIs. After the initial networking is setup for a given pod, the Cilium CNI plugin is called to attach eBPF programs to the network devices set up by the AWS VPC CNI plugin in order to enforce network policies, perform load-balancing and provide encryption.</p><h3>Pre-Requisites</h3><ul><li>Install Helm. To install or upgrade Helm, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/helm.html">Using Helm with Amazon EKS</a>.</li><li>Install <a href="https://kubernetes.io/releases/download/#kubectl">kubectl</a></li><li>Install <a href="https://stedolan.github.io/jq/">jq</a> and the <a href="https://aws.amazon.com/cli/">AWS CLI</a></li><li>Install <a href="https://docs.cilium.io/en/stable/gettingstarted/k8s-install-default/#install-the-cilium-cli">Cilium CLI</a></li><li>If you are running Cilium in an environment that requires <a href="https://docs.cilium.io/en/stable/operations/system_requirements/#firewall-rules">firewall rules</a> to enable connectivity, add the following rules to ensure Cilium works properly.</li><li>Ensure you have enough <a href="https://aws.amazon.com/getting-started/hands-on/request-service-quota-increase/">quota resources</a> to create an EKS cluster.</li><li>EKS clusters cannot be created with the new approach to create clusters minus the core AWS-VPC-CNI add-ons and you will be presented with an error.</li></ul><pre>Error: the default core addons must be defined for IPv6; missing addon(s): vpc-cni, kube-proxy</pre><h3>Key things to Note</h3><ul><li>Prefix Delegation is only supported on VMs based on <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances">nitro</a> hypervisor.</li><li>Currently AWS only supports assigning fixed size prefixes.<br>-/80 for IPv6</li><li>Prefix Delegation for an EKS cluster on IPv6 as can be seen from the error message below:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CwTLU80Akq8P2oVfVZ-YRw.png" /></figure><h3>Let’s get going</h3><h4>Create an EKS cluster</h4><ul><li>Create an EKS cluster with a nodegroup comprising two nodes.<br>-The reason we are creating an EKS Cluster with a nodegroup in this step is to demonstrate the difference of using a nodegroup with no prefix delegation and one with prefix delegation in the steps below.</li></ul><pre>apiVersion: eksctl.io/v1alpha5<br>kind: ClusterConfig<br><br>metadata:<br>     name: cluster6<br>     region: ap-south-1<br>     version: &quot;1.29&quot;<br><br>kubernetesNetworkConfig:<br>  ipFamily: IPv6<br><br><br>iam:<br>  withOIDC: true<br><br>addons:<br>  - name: vpc-cni<br>  - name: coredns<br>  - name: kube-proxy<br><br>managedNodeGroups:<br>   - name: pg-1-nodegroup<br>     instanceType: c5.18xlarge<br>     desiredCapacity: 2<br>     privateNetworking: true<br>     # taint nodes so that application pods are<br>     # not scheduled/executed until Cilium is deployed.<br>     # Alternatively, see the note below.<br>     taints:<br>       - key: &quot;node.cilium.io/agent-not-ready&quot;<br>         value: &quot;true&quot;<br>         effect: &quot;NoExecute&quot;vi </pre><ul><li>Let’s check the status of the nodegroup</li></ul><pre>aws eks describe-nodegroup --nodegroup-name pg1-nodegroup --cluster-name cluster2<br>{<br>    &quot;nodegroup&quot;: {<br>        &quot;nodegroupName&quot;: &quot;pg1-nodegroup&quot;,<br>        &quot;nodegroupArn&quot;: &quot;arn:aws:eks:ap-south-1:##############:nodegroup/cluster6/pg1-nodegroup/cec906d2-de29-dce7-2680-6529a806ea83&quot;,<br>        &quot;clusterName&quot;: &quot;cluster6&quot;,<br>        &quot;version&quot;: &quot;1.29&quot;,<br>        &quot;releaseVersion&quot;: &quot;1.29.8-20240917&quot;,<br>        &quot;createdAt&quot;: &quot;2024-09-20T09:47:01.396000+05:30&quot;,<br>        &quot;modifiedAt&quot;: &quot;2024-09-23T12:08:14.272000+05:30&quot;,<br>        &quot;status&quot;: &quot;ACTIVE&quot;,<br>        &quot;capacityType&quot;: &quot;ON_DEMAND&quot;,<br>        &quot;scalingConfig&quot;: {<br>            &quot;minSize&quot;: 2,<br>            &quot;maxSize&quot;: 2,<br>            &quot;desiredSize&quot;: 2<br>        },<br>        &quot;instanceTypes&quot;: [<br>            &quot;c5.18xlarge&quot;<br>        ],<br>        &quot;subnets&quot;: [<br>            &quot;subnet-020250252adbec2b7&quot;,<br>            &quot;subnet-0fe0b25e31ddd81ec&quot;,<br>            &quot;subnet-07ebf093a25a03f50&quot;<br>        ],<br>        &quot;amiType&quot;: &quot;AL2_x86_64&quot;,<br>        &quot;nodeRole&quot;: &quot;arn:aws:iam::################:role/eksctl-cluster6-nodegroup-pg1-node-NodeInstanceRole-pOPNACB9OHG2&quot;,<br>        &quot;labels&quot;: {<br>            &quot;alpha.eksctl.io/cluster-name&quot;: &quot;cluster6&quot;,<br>            &quot;alpha.eksctl.io/nodegroup-name&quot;: &quot;pg1-nodegroup&quot;<br>        },<br>        &quot;resources&quot;: {<br>            &quot;autoScalingGroups&quot;: [<br>                {<br>                    &quot;name&quot;: &quot;eks-pg1-nodegroup-cec906d2-de29-dce7-2680-6529a806ea83&quot;<br>                }<br>            ]<br>        },<br>        &quot;health&quot;: {<br>            &quot;issues&quot;: []<br>        },<br>        &quot;updateConfig&quot;: {<br>            &quot;maxUnavailable&quot;: 2<br>        },<br>        &quot;launchTemplate&quot;: {<br>            &quot;name&quot;: &quot;eksctl-cluster6-nodegroup-pg1-nodegroup&quot;,<br>            &quot;version&quot;: &quot;1&quot;,<br>            &quot;id&quot;: &quot;lt-0194383bfd0d3fbe3&quot;<br>        },<br>        &quot;tags&quot;: {<br>            &quot;owner&quot;: &quot;Amit Gupta&quot;,<br>            &quot;aws:cloudformation:stack-name&quot;: &quot;eksctl-cluster6-nodegroup-pg1-nodegroup&quot;,<br>            &quot;alpha.eksctl.io/cluster-name&quot;: &quot;cluster6&quot;,<br>            &quot;alpha.eksctl.io/nodegroup-name&quot;: &quot;pg1-nodegroup&quot;,<br>            &quot;aws:cloudformation:stack-id&quot;: &quot;arn:aws:cloudformation:ap-south-1:#################:stack/eksctl-cluster6-nodegroup-pg1-nodegroup/1feae960-7707-11ef-927b-0acbaf185cfb&quot;,<br>            &quot;eksctl.cluster.k8s.io/v1alpha1/cluster-name&quot;: &quot;cluster6&quot;,<br>            &quot;aws:cloudformation:logical-id&quot;: &quot;ManagedNodeGroup&quot;,<br>            &quot;alpha.eksctl.io/nodegroup-type&quot;: &quot;managed&quot;,<br>            &quot;expiry&quot;: &quot;2031-04-07&quot;,<br>            &quot;alpha.eksctl.io/eksctl-version&quot;: &quot;0.187.0&quot;<br>        }<br>    }<br>}</pre><ul><li>Ensure that the pods are up and running.</li></ul><pre>kubectl get pods -o wide -A<br>NAMESPACE     NAME                               READY   STATUS    RESTARTS   AGE     IP                                       NODE                                           NOMINATED NODE   READINESS GATES<br>kube-system   aws-node-4fm7f                     2/2     Running   0          2d19h   2406:da1a:6ab:c502:ff28:42aa:4356:a6f8   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   aws-node-rq9mg                     2/2     Running   0          2d19h   2406:da1a:6ab:c500:67d4:b103:7ac7:f4de   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5d5f56f475-b9gqm           1/1     Running   0          3d3h    2406:da1a:6ab:c500:589e::                ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5d5f56f475-slbps           1/1     Running   0          3d3h    2406:da1a:6ab:c500:589e::4e              ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-2gmrk                   1/1     Running   0          3d3h    2406:da1a:6ab:c500:67d4:b103:7ac7:f4de   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-6578k                   1/1     Running   0          3d2h    2406:da1a:6ab:c502:ff28:42aa:4356:a6f8   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;</pre><ul><li>Enable Prefix Delegation (Optional as Prefix Delegation is enabled by Default for IPv6 based EKS clusters).</li></ul><pre>kubectl set env daemonset aws-node -n kube-system ENABLE_PREFIX_DELEGATION=true</pre><ul><li>Confirm if the environment variable is set.</li></ul><pre>kubectl describe daemonset -n kube-system aws-node | grep ENABLE_PREFIX_DELEGATION<br>      ENABLE_PREFIX_DELEGATION:  true<br>      ENABLE_PREFIX_DELEGATION:  true<br>      ENABLE_PREFIX_DELEGATION:  true </pre><ul><li>Check logs (optional)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lA4ocsHYQMsn3KwL4NLtTA.png" /></figure><h3>Install Cilium</h3><ul><li>Set up Helm repository</li></ul><pre>helm repo add cilium https://helm.cilium.io/</pre><ul><li>Install <a href="https://docs.cilium.io/en/v1.15/installation/k8s-install-helm/">Cilium</a></li></ul><pre>helm install cilium cilium/cilium --version 1.15 \<br>--namespace kube-system \<br>--set ipam.mode=cluster-pool \<br>--set cni.chainingMode=aws-cni \<br>--set cni.exclusive=false \<br>--set ipv6.enabled=true \<br>--set enableIPv6Masquerade=false \<br>--set egressMasqueradeInterfaces=eth0 \<br>--set ipv6NativeRoutingCIDR=fd00::/104 \<br>--set ipam.operator.clusterPoolIPv6PodCIDRList=&quot;fddd::/104&quot; \<br>--set ipam.operator.clusterPoolIPv6MaskSize=120 \<br>--set ipv4.enabled=false</pre><ul><li>Ensure that the cilium pods have come up fine.</li></ul><pre>kubectl get pods -o wide -A<br>NAMESPACE     NAME                               READY   STATUS    RESTARTS   AGE     IP                                       NODE                                           NOMINATED NODE   READINESS GATES<br>kube-system   aws-node-4fm7f                     2/2     Running   0          2d19h   2406:da1a:6ab:c502:ff28:42aa:4356:a6f8   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   aws-node-rq9mg                     2/2     Running   0          2d19h   2406:da1a:6ab:c500:67d4:b103:7ac7:f4de   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-c622s                       1/1     Running   0          61m     2406:da1a:6ab:c500:67d4:b103:7ac7:f4de   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-7947fcd6c5-9rwd8   1/1     Running   0          61m     2406:da1a:6ab:c500:67d4:b103:7ac7:f4de   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-7947fcd6c5-gpmbw   1/1     Running   0          61m     2406:da1a:6ab:c502:ff28:42aa:4356:a6f8   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-pqt8l                       1/1     Running   0          61m     2406:da1a:6ab:c502:ff28:42aa:4356:a6f8   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>hubble-ui     hubble-ui-7b4c87fb48-2cpzz         2/2     Running   0          6m58s   2406:da1a:6ab:c502:f47e::13              ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   hubble-relay-587f6d8589-j9nnz      1/1     Running   0          24s     2406:da1a:6ab:c502:f47e::                ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5d5f56f475-b9gqm           1/1     Running   0          3d3h    2406:da1a:6ab:c500:589e::                ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-5d5f56f475-slbps           1/1     Running   0          3d3h    2406:da1a:6ab:c500:589e::4e              ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-2gmrk                   1/1     Running   0          3d3h    2406:da1a:6ab:c500:67d4:b103:7ac7:f4de   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-proxy-6578k                   1/1     Running   0          3d2h    2406:da1a:6ab:c502:ff28:42aa:4356:a6f8   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;     </pre><ul><li><strong>Validate the installation</strong>- To validate that Cilium has been properly installed with the correct version, run the following command cilium-status , and you will see that Cilium is managing all the pods. They are in “Ready” state and are “Available”.</li></ul><pre>kubectl -n kube-system exec -it ds/cilium -- cilium status<br><br>Defaulted container &quot;cilium-agent&quot; out of: cilium-agent, config (init), mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), clean-cilium-state (init), install-cni-binaries (init)<br>KVStore:                 Ok   Disabled<br>Kubernetes:              Ok   1.29+ (v1.29.7-eks-a18cd3a) [linux/amd64]<br>Kubernetes APIs:         [&quot;EndpointSliceOrEndpoint&quot;, &quot;cilium/v2::CiliumClusterwideNetworkPolicy&quot;, &quot;cilium/v2::CiliumEndpoint&quot;, &quot;cilium/v2::CiliumNetworkPolicy&quot;, &quot;cilium/v2::CiliumNode&quot;, &quot;cilium/v2alpha1::CiliumCIDRGroup&quot;, &quot;core/v1::Namespace&quot;, &quot;core/v1::Pods&quot;, &quot;core/v1::Service&quot;, &quot;networking.k8s.io/v1::NetworkPolicy&quot;]<br>KubeProxyReplacement:    False   [eth0    192.168.3.251 2406:da1a:6ab:c500:67d4:b103:7ac7:f4de fe80::12:5cff:fed2:8aa7]<br>Host firewall:           Disabled<br>SRv6:                    Disabled<br>CNI Chaining:            aws-cni<br>CNI Config file:         successfully wrote CNI configuration file to /host/etc/cni/net.d/05-cilium.conflist<br>Cilium:                  Ok   #############################<br>NodeMonitor:             Listening for events on 72 CPUs with 64x4096 of shared memory<br>Cilium health daemon:    Ok<br>IPAM:                    , IPv6: 1/254 allocated from fddd::300/120<br>IPv4 BIG TCP:            Disabled<br>IPv6 BIG TCP:            Disabled<br>BandwidthManager:        Disabled<br>Host Routing:            Legacy<br>Masquerading:            Disabled<br>Controller Status:       49/49 healthy<br>Proxy Status:            OK, ip &lt;nil&gt;, 0 redirects active on ports 10000-20000, Envoy: embedded<br>Global Identity Range:   min 256, max 65535<br>Hubble:                  Ok         Current/Max Flows: 4095/4095 (100.00%), Flows/s: 4.14   Metrics: Disabled<br>Encryption:              Disabled<br>Cluster health:                     Probe disabled</pre><ul><li><strong>Cluster and Cilium Health Check</strong>- Check the status of the nodes and make sure they are in a “Ready” state.</li></ul><pre>kubectl get nodes -o wide<br><br>NAME                                           STATUS   ROLES    AGE    VERSION               INTERNAL-IP                              EXTERNAL-IP   OS-IMAGE         KERNEL-VERSION                  CONTAINER-RUNTIME<br>ip-192-168-3-251.ap-south-1.compute.internal   Ready    &lt;none&gt;   3d8h   v1.29.8-eks-a737599   2406:da1a:6ab:c500:67d4:b103:7ac7:f4de   &lt;none&gt;        Amazon Linux 2   5.10.224-212.876.amzn2.x86_64   containerd://1.7.11<br>ip-192-168-69-80.ap-south-1.compute.internal   Ready    &lt;none&gt;   3d8h   v1.29.8-eks-a737599   2406:da1a:6ab:c502:ff28:42aa:4356:a6f8   &lt;none&gt;        Amazon Linux 2   5.10.224-212.876.amzn2.x86_64   containerd://1.7.11</pre><ul><li><strong>cilium-health</strong> is a tool available in Cilium that provides visibility into the overall health of the cluster’s networking connectivity. Use cilium-health to get visibility into the overall health of the cluster’s networking connectivity.</li></ul><pre>kubectl -n kube-system exec ds/cilium -- cilium-health status<br><br>Defaulted container &quot;cilium-agent&quot; out of: cilium-agent, config (init), mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), clean-cilium-state (init), install-cni-binaries (init)<br>Probe time:   2024-09-23T12:54:05Z<br>Nodes:<br>  ip-192-168-3-251.ap-south-1.compute.internal (localhost):<br>    Host connectivity to 2406:da1a:6ab:c500:67d4:b103:7ac7:f4de:<br>      ICMP to stack:   OK, RTT=155.111µs<br>      HTTP to agent:   OK, RTT=264.924µs<br>  ip-192-168-69-80.ap-south-1.compute.internal:<br>    Host connectivity to 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8:<br>      ICMP to stack:   OK, RTT=572.607µs<br>      HTTP to agent:   OK, RTT=768.318µs</pre><h3>Demo-Prefix Delegation</h3><ul><li>Create a sample deployment.</li></ul><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx-deployment<br>spec:<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  replicas: 1<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: public.ecr.aws/nginx/nginx:1.21<br>        ports:<br>        - containerPort: 80</pre><ul><li>Apply the deployment</li></ul><pre>kubectl apply -f nginx_deployment.yaml</pre><ul><li>Validate and see how many pods have been deployed.<br>-This includes the 9 pods that were installed while bringing up Cilium</li></ul><pre>kubectl get pods -A | wc -l<br>      12</pre><ul><li>Re-use the sample deployment yaml to scale up the number of pods.</li></ul><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx-deployment<br>spec:<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  replicas: 485<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: public.ecr.aws/nginx/nginx:1.21<br>        ports:<br>        - containerPort: 80</pre><ul><li>Apply the deployment</li></ul><pre>kubectl apply -f nginx_deployment.yaml</pre><ul><li>Check if the deployment is running fine</li></ul><pre>kubectl get deployment<br>NAME               READY     UP-TO-DATE   AVAILABLE   AGE<br>nginx-deployment   485/485   485          485         3m47s</pre><ul><li>Take a look at the private IP addresses for both the nodes in the newly added nodegroup</li></ul><pre>aws ec2 describe-instances --region=ap-south-1 --filters Name=instance-state-name,Values=running --query &#39;Reservations[].Instances[*].{InstanceType: InstanceType, InstanceId: InstanceId, State: State.Name, Name:InstanceName}&#39; --output table<br>------------------------------------------------------------<br>|                     DescribeInstances                    |<br>+----------------------+----------------+-------+----------+<br>|      InstanceId      | InstanceType   | Name  |  State   |<br>+----------------------+----------------+-------+----------+<br>|  i-0fc868125c1398daf |  c5.18xlarge   |  None |  running |<br>|  i-024566899b50d080d |  c5.18xlarge   |  None |  running |<br>+----------------------+----------------+-------+----------+</pre><pre>aws ec2 describe-instances --instance-ids  i-0fc868125c1398daf --region ap-south-1 | jq -r &#39;.Reservations[].Instances[].NetworkInterfaces[].PrivateIpAddresses[].PrivateIpAddress&#39;<br>192.168.69.80<br><br>aws ec2 describe-instances --instance-ids  i-024566899b50d080d --region ap-south-1 | jq -r &#39;.Reservations[].Instances[].NetworkInterfaces[].PrivateIpAddresses[].PrivateIpAddress&#39;<br>192.168.3.251</pre><ul><li>There are no secondary IP addresses. Let’s take a closer look at the IPv6 Prefixes that have been generated. Check the number of prefixes that are being allocated on runtime.</li></ul><pre>aws ec2 describe-network-interfaces --network-interface-ids  eni-0efc05b4a6fd5ce6d --region ap-south-1 | grep Ipv6Prefix<br>            &quot;Ipv6Prefixes&quot;: [<br>                    &quot;Ipv6Prefix&quot;: &quot;2406:da1a:6ab:c502:f47e::/80&quot;<br><br>aws ec2 describe-network-interfaces --network-interface-ids  eni-0b37e3a4dff4acb82 --region ap-south-1 | grep Ipv6Prefix<br>            &quot;Ipv6Prefixes&quot;: [<br>                    &quot;Ipv6Prefix&quot;: &quot;2406:da1a:6ab:c500:589e::/80&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-MytZbAxT0GMJlzhljKVmg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xO2j7aJfSFXK9d0RP8p9-g.png" /></figure><p><strong>You can now see that nodes are allocating /80 IPv6 Prefixes to the application pods.</strong></p><ul><li>If you continue to scale up the deployment we can see that the /80 prefix very well suffices the need ( for the sake of this post we went upto 500 pods). This is explained well under <a href="https://github.com/kubernetes/community/blob/master/sig-scalability/configs-and-limits/thresholds.md">Kubernetes scalability thresholds</a>.</li></ul><h3>Demo-Advanced Features for Cilium in IPv6 mode</h3><ul><li>You can deploy pods that have dual-stack or single-stack (IPv6) functionality by using the <a href="https://github.com/nicolaka/netshoot">netshoot</a> image. Create a pod named pod-worker</li></ul><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: pod-worker<br>  labels:<br>    app: pod-worker<br>spec:<br>  nodeName: ip-192-168-3-251.ap-south-1.compute.internal<br>  containers:<br>  - name: netshoot<br>    image: nicolaka/netshoot:latest<br>    command: [&quot;sleep&quot;, &quot;infinite&quot;]</pre><ul><li>Deploy another Pod (named pod1-worker1) to verify successfully IPv6 connectivity.</li></ul><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: pod1-worker1<br>  labels:<br>    app: pod1-worker1<br>spec:<br>  nodeName: ip-192-168-69-80.ap-south-1.compute.internal<br>  containers:<br>  - name: netshoot<br>    image: nicolaka/netshoot:latest<br>    command: [&quot;sleep&quot;, &quot;infinite&quot;]</pre><ul><li>Once you deploy the pods, check the IP address of the pods.</li></ul><pre>kubectl get pods -o wide<br><br>NAME                                READY   STATUS    RESTARTS   AGE     IP                            NODE                                           NOMINATED NODE   READINESS GATES<br>client                              1/1     Running   0          87m     2406:da1a:6ab:c502:f47e::f3   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>echoserver-5c96cdb7b5-5ksmg         1/1     Running   0          79m     2406:da1a:6ab:c500:589e::f6   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>echoserver-5c96cdb7b5-5sppv         1/1     Running   0          79m     2406:da1a:6ab:c502:f47e::f6   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>nginx-56fcf95486-df6h7              1/1     Running   0          84m     2406:da1a:6ab:c502:f47e::f5   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>nginx-deployment-698f48c766-vkl6p   1/1     Running   0          4h44m   2406:da1a:6ab:c500:589e::52   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>pod-worker                          1/1     Running   0          86m     2406:da1a:6ab:c500:589e::f5   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>pod1-worker1                        1/1     Running   0          85m     2406:da1a:6ab:c502:f47e::f4   ip-192-168-69-80.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;<br>server                              1/1     Running   0          87m     2406:da1a:6ab:c500:589e::1e   ip-192-168-3-251.ap-south-1.compute.internal   &lt;none&gt;           &lt;none&gt;</pre><ul><li><strong>Verify IPv6 pod-to-pod connectivity</strong>- Both pods are manually pinned to different hosts by using spec.nodeName. As a result, the successful ping below showed successful IPv6 connectivity between Pods on different nodes.</li></ul><pre>IPv6=$(kubectl get pod pod-worker -o jsonpath=&#39;{.status.podIPs[0].ip}&#39;)<br>kubectl exec -it pod1-worker1 -- ping $IPv6<br>PING 2406:da1a:6ab:c500:589e::f5 (2406:da1a:6ab:c500:589e::f5) 56 data bytes<br>64 bytes from 2406:da1a:6ab:c500:589e::f5: icmp_seq=1 ttl=62 time=0.705 ms<br>64 bytes from 2406:da1a:6ab:c500:589e::f5: icmp_seq=2 ttl=62 time=0.512 ms<br>64 bytes from 2406:da1a:6ab:c500:589e::f5: icmp_seq=3 ttl=62 time=0.519 ms<br>64 bytes from 2406:da1a:6ab:c500:589e::f5: icmp_seq=4 ttl=62 time=0.518 ms<br>4 packets transmitted, 4 received, 0% packet loss, time 3049ms<br>rtt min/avg/max/mdev = 0.512/0.563/0.705/0.081 ms<br><br>IPv6=$(kubectl get pod pod1-worker1 -o jsonpath=&#39;{.status.podIPs[0].ip}&#39;)<br>kubectl exec -it pod-worker -- ping $IPv6<br>PING 2406:da1a:6ab:c502:f47e::f4 (2406:da1a:6ab:c502:f47e::f4) 56 data bytes<br>64 bytes from 2406:da1a:6ab:c502:f47e::f4: icmp_seq=1 ttl=62 time=0.689 ms<br>64 bytes from 2406:da1a:6ab:c502:f47e::f4: icmp_seq=2 ttl=62 time=0.487 ms<br>64 bytes from 2406:da1a:6ab:c502:f47e::f4: icmp_seq=3 ttl=62 time=0.519 ms<br>64 bytes from 2406:da1a:6ab:c502:f47e::f4: icmp_seq=4 ttl=62 time=0.530 ms<br>4 packets transmitted, 4 received, 0% packet loss, time 3053ms<br>rtt min/avg/max/mdev = 0.487/0.556/0.689/0.078 ms</pre><ul><li><strong>IPv6 Pod-to-Service connectivity</strong>- Use an echo server (An echo server is a server that replicates the request sent by the client and sends it back).</li></ul><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: echoserver<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: echoserver<br>  template:<br>    metadata:<br>      labels:<br>        app: echoserver<br>    spec:<br>      containers:<br>      - image: ealen/echo-server:latest<br>        imagePullPolicy: IfNotPresent<br>        name: echoserver<br>        ports:<br>        - containerPort: 80<br>        env:<br>        - name: PORT<br>          value: &quot;80&quot;<br>---<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: echoserver<br>spec:<br>  ipFamilyPolicy: SingleStack<br>  ipFamilies:<br>  - IPv6<br>  ports:<br>    - port: 80<br>      targetPort: 80<br>      protocol: TCP<br>  type: ClusterIP<br>  selector:<br>    app: echoserver</pre><p>-Deploy the service</p><pre>kubectl apply -f echo-kube-ipv6.yaml<br>deployment.apps/echoserver created<br>service/echoserver created</pre><p>-The echoserver Service should have an IPv6 address.</p><pre>kubectl describe svc echoserver<br>Name:              echoserver<br>Namespace:         default<br>Labels:            &lt;none&gt;<br>Annotations:       &lt;none&gt;<br>Selector:          app=echoserver<br>Type:              ClusterIP<br>IP Family Policy:  SingleStack<br>IP Families:       IPv6<br>IP:                fdb6:4a07:4de1::7dff<br>IPs:               fdb6:4a07:4de1::7dff<br>Port:              &lt;unset&gt;  80/TCP<br>TargetPort:        80/TCP<br>Endpoints:         [2406:da1a:6ab:c500:589e::f6]:80,[2406:da1a:6ab:c502:f47e::f6]:80<br>Session Affinity:  None<br>Events:            &lt;none&gt;</pre><ul><li><strong>AAAA queries</strong>- AAAA records are assigned automatically to Services. You can do an nslookup -q=AAAA to make an IPv6 DNS query.</li></ul><pre>kubectl exec -it pod1-worker1 -- nslookup -q=AAAA echoserver.default<br>Server:         fdb6:4a07:4de1::a<br>Address:        fdb6:4a07:4de1::a#53<br><br>Name:   echoserver.default.svc.cluster.local<br>Address: fdb6:4a07:4de1::7dff<br><br>kubectl exec -it pod-worker -- nslookup -q=AAAA echoserver.default<br>Server:         fdb6:4a07:4de1::a<br>Address:        fdb6:4a07:4de1::a#53<br><br>Name:   echoserver.default.svc.cluster.local<br>Address: fdb6:4a07:4de1::7dff</pre><ul><li><strong>HTTP Requests- </strong>curl requests to the AAAA record or the IP address should be executed successfully.</li></ul><pre>kubectl exec -it pod-worker -- bash<br><br>pod-worker:~# curl --interface eth0 -g -6 &#39;http://echoserver.default.svc&#39;<br>{&quot;host&quot;:{&quot;hostname&quot;:&quot;echoserver.default.svc&quot;,&quot;ip&quot;:&quot;2406:da1a:6ab:c500:589e::f5&quot;,&quot;ips&quot;:[]},&quot;http&quot;:{&quot;method&quot;:&quot;GET&quot;,&quot;baseUrl&quot;:&quot;&quot;,&quot;originalUrl&quot;:&quot;/&quot;,&quot;protocol&quot;:&quot;http&quot;},&quot;request&quot;:{&quot;params&quot;:{&quot;0&quot;:&quot;/&quot;},&quot;query&quot;:{},&quot;cookies&quot;:{},&quot;body&quot;:{},&quot;headers&quot;:{&quot;host&quot;:&quot;echoserver.default.svc&quot;,&quot;user-agent&quot;:&quot;curl/8.7.1&quot;,&quot;accept&quot;:&quot;*/*&quot;}},&quot;environment&quot;:{&quot;PATH&quot;:&quot;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&quot;,&quot;HOSTNAME&quot;:&quot;echoserver-5c96cdb7b5-5ksmg&quot;,&quot;NODE_VERSION&quot;:&quot;20.11.0&quot;,&quot;YARN_VERSION&quot;:&quot;1.22.19&quot;,&quot;PORT&quot;:&quot;80&quot;,&quot;SERVER_PORT&quot;:&quot;tcp://[fdb6:4a07:4de1::ee39]:80&quot;,&quot;NGINX_IPV6_PORT_80_TCP_PROTO&quot;:&quot;tcp&quot;,&quot;KUBERNETES_SERVICE_PORT&quot;:&quot;443&quot;,&quot;KUBERNETES_PORT_443_TCP_PROTO&quot;:&quot;tcp&quot;,&quot;KUBERNETES_PORT_443_TCP_ADDR&quot;:&quot;fdb6:4a07:4de1::1&quot;,&quot;SERVER_PORT_80_TCP_PORT&quot;:&quot;80&quot;,&quot;ECHOSERVER_PORT_80_TCP_PORT&quot;:&quot;80&quot;,&quot;ECHOSERVER_PORT_80_TCP_ADDR&quot;:&quot;fdb6:4a07:4de1::7dff&quot;,&quot;KUBERNETES_PORT&quot;:&quot;tcp://[fdb6:4a07:4de1::1]:443&quot;,&quot;NGINX_IPV6_PORT_80_TCP_ADDR&quot;:&quot;fdb6:4a07:4de1::bd18&quot;,&quot;ECHOSERVER_SERVICE_PORT&quot;:&quot;80&quot;,&quot;SERVER_PORT_80_TCP&quot;:&quot;tcp://[fdb6:4a07:4de1::ee39]:80&quot;,&quot;NGINX_IPV6_PORT&quot;:&quot;tcp://[fdb6:4a07:4de1::bd18]:80&quot;,&quot;NGINX_IPV6_PORT_80_TCP&quot;:&quot;tcp://[fdb6:4a07:4de1::bd18]:80&quot;,&quot;NGINX_IPV6_PORT_80_TCP_PORT&quot;:&quot;80&quot;,&quot;SERVER_SERVICE_PORT&quot;:&quot;80&quot;,&quot;SERVER_PORT_80_TCP_PROTO&quot;:&quot;tcp&quot;,&quot;ECHOSERVER_PORT_80_TCP_PROTO&quot;:&quot;tcp&quot;,&quot;KUBERNETES_PORT_443_TCP_PORT&quot;:&quot;443&quot;,&quot;SERVER_PORT_80_TCP_ADDR&quot;:&quot;fdb6:4a07:4de1::ee39&quot;,&quot;NGINX_IPV6_SERVICE_PORT&quot;:&quot;80&quot;,&quot;ECHOSERVER_PORT&quot;:&quot;tcp://[fdb6:4a07:4de1::7dff]:80&quot;,&quot;SERVER_SERVICE_HOST&quot;:&quot;fdb6:4a07:4de1::ee39&quot;,&quot;ECHOSERVER_PORT_80_TCP&quot;:&quot;tcp://[fdb6:4a07:4de1::7dff]:80&quot;,&quot;KUBERNETES_SERVICE_HOST&quot;:&quot;fdb6:4a07:4de1::1&quot;,&quot;ECHOSERVER_SERVICE_HOST&quot;:&quot;fdb6:4a07:4de1::7dff&quot;,&quot;KUBERNETES_PORT_443_TCP&quot;:&quot;tcp://[fdb6:4a07:4de1::1]:443&quot;,&quot;NGINX_IPV6_SERVICE_HOST&quot;:&quot;fdb6:4a07:4de1::bd18&quot;,&quot;KUBERNETES_SERVICE_PORT_HTTPS&quot;:&quot;443&quot;,&quot;HOME&quot;:&quot;/root&quot;}}<br><br>pod-worker:~# curl --interface eth0 -g -6 &#39;http://[fdb6:4a07:4de1::7dff]&#39;<br>{&quot;host&quot;:{&quot;hostname&quot;:&quot;[fdb6:4a07:4de1::7dff]&quot;,&quot;ip&quot;:&quot;2406:da1a:6ab:c500:589e::f5&quot;,&quot;ips&quot;:[]},&quot;http&quot;:{&quot;method&quot;:&quot;GET&quot;,&quot;baseUrl&quot;:&quot;&quot;,&quot;originalUrl&quot;:&quot;/&quot;,&quot;protocol&quot;:&quot;http&quot;},&quot;request&quot;:{&quot;params&quot;:{&quot;0&quot;:&quot;/&quot;},&quot;query&quot;:{},&quot;cookies&quot;:{},&quot;body&quot;:{},&quot;headers&quot;:{&quot;host&quot;:&quot;[fdb6:4a07:4de1::7dff]&quot;,&quot;user-agent&quot;:&quot;curl/8.7.1&quot;,&quot;accept&quot;:&quot;*/*&quot;}},&quot;environment&quot;:{&quot;PATH&quot;:&quot;/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&quot;,&quot;HOSTNAME&quot;:&quot;echoserver-5c96cdb7b5-5sppv&quot;,&quot;NODE_VERSION&quot;:&quot;20.11.0&quot;,&quot;YARN_VERSION&quot;:&quot;1.22.19&quot;,&quot;PORT&quot;:&quot;80&quot;,&quot;KUBERNETES_PORT_443_TCP_PORT&quot;:&quot;443&quot;,&quot;SERVER_PORT_80_TCP_PORT&quot;:&quot;80&quot;,&quot;ECHOSERVER_PORT_80_TCP&quot;:&quot;tcp://[fdb6:4a07:4de1::7dff]:80&quot;,&quot;NGINX_IPV6_PORT&quot;:&quot;tcp://[fdb6:4a07:4de1::bd18]:80&quot;,&quot;NGINX_IPV6_PORT_80_TCP&quot;:&quot;tcp://[fdb6:4a07:4de1::bd18]:80&quot;,&quot;ECHOSERVER_SERVICE_HOST&quot;:&quot;fdb6:4a07:4de1::7dff&quot;,&quot;SERVER_SERVICE_PORT&quot;:&quot;80&quot;,&quot;NGINX_IPV6_PORT_80_TCP_PROTO&quot;:&quot;tcp&quot;,&quot;NGINX_IPV6_PORT_80_TCP_ADDR&quot;:&quot;fdb6:4a07:4de1::bd18&quot;,&quot;ECHOSERVER_PORT_80_TCP_ADDR&quot;:&quot;fdb6:4a07:4de1::7dff&quot;,&quot;KUBERNETES_SERVICE_HOST&quot;:&quot;fdb6:4a07:4de1::1&quot;,&quot;KUBERNETES_SERVICE_PORT_HTTPS&quot;:&quot;443&quot;,&quot;KUBERNETES_PORT_443_TCP_ADDR&quot;:&quot;fdb6:4a07:4de1::1&quot;,&quot;KUBERNETES_PORT_443_TCP_PROTO&quot;:&quot;tcp&quot;,&quot;NGINX_IPV6_SERVICE_PORT&quot;:&quot;80&quot;,&quot;NGINX_IPV6_SERVICE_HOST&quot;:&quot;fdb6:4a07:4de1::bd18&quot;,&quot;ECHOSERVER_PORT_80_TCP_PROTO&quot;:&quot;tcp&quot;,&quot;SERVER_SERVICE_HOST&quot;:&quot;fdb6:4a07:4de1::ee39&quot;,&quot;SERVER_PORT&quot;:&quot;tcp://[fdb6:4a07:4de1::ee39]:80&quot;,&quot;SERVER_PORT_80_TCP_PROTO&quot;:&quot;tcp&quot;,&quot;SERVER_PORT_80_TCP_ADDR&quot;:&quot;fdb6:4a07:4de1::ee39&quot;,&quot;ECHOSERVER_PORT&quot;:&quot;tcp://[fdb6:4a07:4de1::7dff]:80&quot;,&quot;KUBERNETES_SERVICE_PORT&quot;:&quot;443&quot;,&quot;KUBERNETES_PORT&quot;:&quot;tcp://[fdb6:4a07:4de1::1]:443&quot;,&quot;KUBERNETES_PORT_443_TCP&quot;:&quot;tcp://[fdb6:4a07:4de1::1]:443&quot;,&quot;ECHOSERVER_PORT_80_TCP_PORT&quot;:&quot;80&quot;,&quot;SERVER_PORT_80_TCP&quot;:&quot;tcp://[fdb6:4a07:4de1::ee39]:80&quot;,&quot;NGINX_IPV6_PORT_80_TCP_PORT&quot;:&quot;80&quot;,&quot;ECHOSERVER_SERVICE_PORT&quot;:&quot;80&quot;,&quot;HOME&quot;:&quot;/root&quot;}}</pre><ul><li><strong>Monitor IPv6 traffic flows with Hubble <br>-</strong>Hubble’s CLI extends the visibility that is provided by standard kubectl commands like kubectl get pods to give you more network-level details about a request, such as its status and the <a href="https://isovalent.com/blog/post/hubble-series-re-introducing-hubble/#h-what-is-hubble">security identities</a> associated with its source and destination.<br>-The Hubble CLI can be leveraged to observe network flows from Cilium agents. Users can observe the flows from their local machine workstation for troubleshooting or monitoring.</li></ul><pre>kubectl port-forward -n kube-system svc/hubble-relay 4245:80<br>Forwarding from 127.0.0.1:4245 -&gt; 4245<br>Forwarding from [::1]:4245 -&gt; 4245<br>Handling connection for 4245</pre><ul><li>View the flows in Hubble CLI<br> -Traffic from pod-worker to pod1-worker1</li></ul><pre>hubble observe --ipv6 --from-pod pod-worker<br>Sep 23 13:51:46.196: default/pod-worker (ID:19958) -&gt; default/pod1-worker1 (ID:40016) to-stack FORWARDED (ICMPv6 EchoRequest)<br>Sep 23 13:51:46.197: default/pod-worker (ID:19958) -&gt; default/pod1-worker1 (ID:40016) to-endpoint FORWARDED (ICMPv6 EchoRequest)</pre><ul><li>View the flows in Hubble CLI<br>-Print the node where the pods are running with the --print-node-name</li></ul><pre>hubble observe --ipv6 --from-pod pod-worker --print-node-name<br>Sep 23 13:51:46.196 [ip-192-168-3-251.ap-south-1.compute.internal]: default/pod-worker (ID:19958) -&gt; default/pod1-worker1 (ID:40016) to-stack FORWARDED (ICMPv6 EchoRequest)<br>Sep 23 13:51:46.197 [ip-192-168-69-80.ap-south-1.compute.internal]: default/pod-worker (ID:19958) -&gt; default/pod1-worker1 (ID:40016) to-endpoint FORWARDED (ICMPv6 EchoRequest)<br>Sep 23 13:51:52.342 [ip-192-168-3-251.ap-south-1.compute.internal]: default/pod-worker (ID:19958) -&gt; default/pod1-worker1 (ID:40016) to-stack FORWARDED (ICMPv6 EchoRequest)<br>Sep 23 13:51:52.342 [ip-192-168-69-80.ap-south-1.compute.internal]: default/pod-worker (ID:19958) -&gt; default/pod1-worker1 (ID:40016) to-endpoint FORWARDED (ICMPv6 EchoRequest)<br>Sep 23 13:52:52.550 [ip-192-168-3-251.ap-south-1.compute.internal]: default/pod-worker (ID:19958) -&gt; default/pod1-worker1 (ID:40016) to-stack FORWARDED (ICMPv6 EchoRequest)<br>Sep 23 13:52:52.551 [ip-192-168-69-80.ap-south-1.compute.internal]: default/pod-worker (ID:19958) -&gt; default/pod1-worker1 (ID:40016) to-endpoint FORWARDED (ICMPv6 EchoRequest)</pre><ul><li>View the flows in Hubble CLI<br>-View <strong>HTTP </strong>and <strong>ICMPv6 </strong>Flows</li></ul><pre>hubble observe --ipv6 --from-pod pod-worker -o dict --ip-translation=false<br>  TIMESTAMP: Sep 23 13:51:46.196<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:51:46.197<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:51:52.342<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:51:52.342<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:52:52.550<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:52:52.551<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:52:58.678<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:52:58.678<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:03.797<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:04.822<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:09.941<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:10.966<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:16.085<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:17.110<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:22.229<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:23.253<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:28.373<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:29.398<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:34.517<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:35.542<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:40.662<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:41.686<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:45.781<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:47.830<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:51.925<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:53.974<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:53:58.069<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:00.118<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:04.213<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:06.262<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:10.358<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:12.406<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:16.502<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:18.550<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:22.645<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:24.694<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:27.765<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:30.838<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:33.909<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-stack<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest<br>------------<br>  TIMESTAMP: Sep 23 13:54:36.982<br>     SOURCE: 2406:da1a:6ab:c500:589e::f5<br>DESTINATION: 2406:da1a:6ab:c502:f47e::f4<br>       TYPE: to-endpoint<br>    VERDICT: FORWARDED<br>    SUMMARY: ICMPv6 EchoRequest</pre><ul><li><strong>Hubble UI- </strong>Hubble-UI (Enterprise documentation) is enabled via helm charts. Once the installation is complete, you will notice hubble-ui pods are up and running:</li></ul><pre>kubectl get pods -n hubble-ui<br>NAME                         READY   STATUS    RESTARTS   AGE<br>hubble-ui-7b4c87fb48-2cpzz   2/2     Running   0          24m</pre><ul><li>Validate the installation and verify the flows on Hubble- To access Hubble UI, forward a local port to the Hubble UI service:</li></ul><pre>kubectl port-forward -n hubble-ui svc/hubble-ui 12000:80</pre><ul><li>Open <a href="http://localhost:12000/">http://localhost:12000</a> in your browser.</li><li>You should be able to see all your flows. To narrow down the results, you can filter based on the pod’s name to only see the flows you are interested in.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AK_fDlCkJLVQTE3maRBINw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OaggSf3yiTb3GvjGKTcM0A.png" /></figure><ul><li><strong>Wireguard (Pod-to-Pod)- </strong>When WireGuard is enabled in Cilium, the agent running on each cluster node will establish a secure WireGuard tunnel between it and all other known nodes.<br>-Packets are not encrypted when destined to the same node from which they were sent. This behavior is intended. Encryption would provide no benefits, given that the raw traffic can be observed on the node anyway.<br>-To demonstrate Wireguard encryption, you can create a client pod spun up on one node and a server pod spun up on another in EKS.<br>-The client does a “wget” towards the server every 2 seconds.</li></ul><pre>---<br>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: client<br>  labels:<br>    post: eks-wg-cilium<br>    name: client<br>spec:<br>  containers:<br>    - name: client<br>      image: busybox<br>      command: [&quot;watch&quot;, &quot;wget&quot;, &quot;server&quot;]<br>  topologySpreadConstraints:<br>  - maxSkew: 1<br>    topologyKey: &quot;kubernetes.io/hostname&quot;<br>    whenUnsatisfiable: DoNotSchedule<br>    labelSelector:<br>      matchLabels:<br>        post: eks-wg-cilium<br><br>---<br>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: server<br>  labels:<br>    post: eks-wg-cilium<br>    name: server<br>spec:<br>  containers:<br>    - name: server<br>      image: nginx<br>  topologySpreadConstraints:<br>  - maxSkew: 1<br>    topologyKey: &quot;kubernetes.io/hostname&quot;<br>    whenUnsatisfiable: DoNotSchedule<br>    labelSelector:<br>      matchLabels:<br>        post: eks-wg-cilium<br>---<br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: server<br>spec:<br>  selector:<br>    name: server<br>  ports:<br>  - port: 80</pre><p>-Run a bash shell in one of the Cilium pods with kubectl -n kube-system exec -ti ds/cilium -- bash and execute the following command.<br>-Notice how the client, echoserver, nginx, server pods have been added underallowed-ips</p><pre>root@ip-192-168-3-251:/home/cilium# cilium-dbg debuginfo --output json | jq .encryption<br>{<br>  &quot;wireguard&quot;: {<br>    &quot;interfaces&quot;: [<br>      {<br>        &quot;listen-port&quot;: 51871,<br>        &quot;name&quot;: &quot;cilium_wg0&quot;,<br>        &quot;peer-count&quot;: 1,<br>        &quot;peers&quot;: [<br>          {<br>            &quot;allowed-ips&quot;: [<br>              &quot;2406:da1a:6ab:c502:ff28:42aa:4356:a6f8/128&quot;,<br>              &quot;2406:da1a:6ab:c502:f47e::f3/128&quot;,<br>              &quot;2406:da1a:6ab:c502:f47e::f6/128&quot;,<br>              &quot;2406:da1a:6ab:c502:f47e::f5/128&quot;,<br>              &quot;2406:da1a:6ab:c502:f47e::f4/128&quot;,<br>              &quot;2406:da1a:6ab:c502:f47e::13/128&quot;,<br>              &quot;2406:da1a:6ab:c502:f47e::/128&quot;<br>            ],<br>            &quot;endpoint&quot;: &quot;[2406:da1a:6ab:c502:ff28:42aa:4356:a6f8]:51871&quot;,<br>            &quot;last-handshake-time&quot;: &quot;2024-09-23T14:18:21.238Z&quot;,<br>            &quot;public-key&quot;: &quot;###########################################&quot;,<br>            &quot;transfer-rx&quot;: 227296,<br>            &quot;transfer-tx&quot;: 415408<br>          }<br>        ],<br>        &quot;public-key&quot;: &quot;###########################################&quot;<br>      }<br>    ],<br>    &quot;node-encryption&quot;: &quot;Disabled&quot;<br>  }<br>}</pre><p>-Install tcpdump on the node where the server pod has been created.</p><pre>apt-get update<br>apt-get -y install tcpdump</pre><p>-Install tcpdump on the node where the server pod has been created. You can also observe traffic in case any other IPv6 pods are attached to this node. In the below example one of the pod1-worker1 pods is receiving ICMPv6 traffic.</p><pre>root@ip-192-168-3-251:/home/cilium# tcpdump -i cilium_wg0<br>tcpdump: verbose output suppressed, use -v[v]... for full protocol decode<br>listening on cilium_wg0, link-type RAW (Raw IP), snapshot length 262144 bytes<br>14:21:01.754001 IP6 2406:da1a:6ab:c502:f47e::f3.46412 &gt; 2406:da1a:6ab:c500:589e::4e.domain: 37410+ A? server.default.svc.cluster.local. (50)<br>14:21:01.754135 IP6 2406:da1a:6ab:c502:f47e::f3.46412 &gt; 2406:da1a:6ab:c500:589e::4e.domain: 11047+ AAAA? server.default.svc.cluster.local. (50)<br>14:21:01.754449 IP6 2406:da1a:6ab:c500:589e::4e.domain &gt; 2406:da1a:6ab:c502:f47e::f3.46412: 11047*- 1/0/0 AAAA fdb6:4a07:4de1::ee39 (110)<br>14:21:01.754532 IP6 2406:da1a:6ab:c500:589e::4e.domain &gt; 2406:da1a:6ab:c502:f47e::f3.46412: 37410*- 0/1/0 (143)<br>14:21:01.755868 IP6 2406:da1a:6ab:c502:f47e::f3.55236 &gt; 2406:da1a:6ab:c500:589e::1e.http: Flags [S], seq 2482566093, win 62587, options [mss 8941,sackOK,TS val 406379043 ecr 0,nop,wscale 7], length 0<br>14:21:01.755993 IP6 2406:da1a:6ab:c500:589e::1e.http &gt; 2406:da1a:6ab:c502:f47e::f3.55236: Flags [S.], seq 2613343020, ack 2482566094, win 62503, options [mss 8941,sackOK,TS val 3380656537 ecr 406379043,nop,wscale 7], length 0<br>14:21:01.756926 IP6 2406:da1a:6ab:c502:f47e::f3.55236 &gt; 2406:da1a:6ab:c500:589e::1e.http: Flags [.], ack 1, win 489, options [nop,nop,TS val 406379045 ecr 3380656537], length 0<br>14:21:01.756927 IP6 2406:da1a:6ab:c502:f47e::f3.55236 &gt; 2406:da1a:6ab:c500:589e::1e.http: Flags [P.], seq 1:70, ack 1, win 489, options [nop,nop,TS val 406379045 ecr 3380656537], length 69: HTTP: GET / HTTP/1.1<br>14:21:01.757067 IP6 2406:da1a:6ab:c500:589e::1e.http &gt; 2406:da1a:6ab:c502:f47e::f3.55236: Flags [.], ack 70, win 488, options [nop,nop,TS val 3380656538 ecr 406379045], length 0<br>14:21:01.757211 IP6 2406:da1a:6ab:c500:589e::1e.http &gt; 2406:da1a:6ab:c502:f47e::f3.55236: Flags [P.], seq 1:234, ack 70, win 488, options [nop,nop,TS val 3380656538 ecr 406379045], length 233: HTTP: HTTP/1.1 200 OK<br>14:21:01.757259 IP6 2406:da1a:6ab:c500:589e::1e.http &gt; 2406:da1a:6ab:c502:f47e::f3.55236: Flags [FP.], seq 234:849, ack 70, win 488, options [nop,nop,TS val 3380656538 ecr 406379045], length 615: HTTP<br>14:21:01.757850 IP6 2406:da1a:6ab:c502:f47e::f3.55236 &gt; 2406:da1a:6ab:c500:589e::1e.http: Flags [.], ack 234, win 488, options [nop,nop,TS val 406379046 ecr 3380656538], length 0<br>14:21:01.757884 IP6 2406:da1a:6ab:c502:f47e::f3.55236 &gt; 2406:da1a:6ab:c500:589e::1e.http: Flags [.], ack 850, win 484, options [nop,nop,TS val 406379046 ecr 3380656538], length 0<br>14:21:01.758169 IP6 2406:da1a:6ab:c502:f47e::f3.55236 &gt; 2406:da1a:6ab:c500:589e::1e.http: Flags [F.], seq 70, ack 850, win 484, options [nop,nop,TS val 406379046 ecr 3380656538], length 0<br>14:21:01.758226 IP6 2406:da1a:6ab:c500:589e::1e.http &gt; 2406:da1a:6ab:c502:f47e::f3.55236: Flags [.], ack 71, win 488, options [nop,nop,TS val 3380656539 ecr 406379046], length 0<br><br>14:46:47.349887 IP6 2406:da1a:6ab:c500:589e::f5 &gt; 2406:da1a:6ab:c502:f47e::f4: ICMP6, echo request, id 74, seq 8, length 64<br>14:46:47.350886 IP6 2406:da1a:6ab:c502:f47e::f4 &gt; 2406:da1a:6ab:c500:589e::f5: ICMP6, echo reply, id 74, seq 8, length 64<br>14:46:48.351266 IP6 2406:da1a:6ab:c500:589e::f5 &gt; 2406:da1a:6ab:c502:f47e::f4: ICMP6, echo request, id 74, seq 9, length 64<br>14:46:48.352327 IP6 2406:da1a:6ab:c502:f47e::f4 &gt; 2406:da1a:6ab:c500:589e::f5: ICMP6, echo reply, id 74, seq 9, length 64</pre><h4>Wireguard (Node-to-Node)</h4><p>By default, WireGuard-based encryption only encrypts traffic between Cilium-managed Pods. You can also enable node-to-node encryption, which encrypts node-to-node, pod-to-node, and node-to-pod traffic.</p><ul><li>Check that WireGuard has been enabled (NodeEncryption: Enabled)</li></ul><pre>kubectl -n kube-system exec ds/cilium -- cilium status | grep Encryption<br><br>Defaulted container &quot;cilium-agent&quot; out of: cilium-agent, config (init), mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), clean-cilium-state (init), install-cni-binaries (init)<br>Encryption:              Wireguard   [NodeEncryption: Enabled, cilium_wg0 (Pubkey: ############################################, Port: 51871, Peers: 1)]</pre><ul><li>Install tcpdump on the node(s).</li></ul><pre>yum update<br>yum install -y tcpdump</pre><ul><li>Check that node-to-node traffic is sent via the cilium_wg0 tunnel device.</li></ul><pre>kubectl get nodes -o wide<br>NAME                                           STATUS   ROLES    AGE     VERSION               INTERNAL-IP                              EXTERNAL-IP   OS-IMAGE         KERNEL-VERSION                  CONTAINER-RUNTIME<br>ip-192-168-3-251.ap-south-1.compute.internal   Ready    &lt;none&gt;   7d12h   v1.29.8-eks-a737599   2406:da1a:6ab:c500:67d4:b103:7ac7:f4de   &lt;none&gt;        Amazon Linux 2   5.10.224-212.876.amzn2.x86_64   containerd://1.7.11<br>ip-192-168-69-80.ap-south-1.compute.internal   Ready    &lt;none&gt;   7d12h   v1.29.8-eks-a737599   2406:da1a:6ab:c502:ff28:42aa:4356:a6f8   &lt;none&gt;        Amazon Linux 2   5.10.224-212.876.amzn2.x86_64   containerd://1.7.11</pre><ul><li>Traffic is encrypted between the two Nodes through the WireGuard interface. You can observe that Cilium Health requires port TCP 4240 for all the Nodes for Cilium Health monitoring, and this traffic is also encrypted between the Nodes.</li></ul><pre>17:00:27.733519 IP6 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8 &gt; ip-192-168-3-251.ap-south-1.compute.internal: ICMP6, echo request, seq 18181, length 24<br>17:00:27.733519 IP6 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8.33926 &gt; ip-192-168-3-251.ap-south-1.compute.internal.4240: Flags [P.], seq 2859940242:2859940373, ack 2622246601, win 489, options [nop,nop,TS val 2292524425 ecr 765416121], length 131<br>17:00:27.733634 IP6 ip-192-168-3-251.ap-south-1.compute.internal &gt; 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8: ICMP6, echo reply, seq 18181, length 24<br>17:00:27.733819 IP6 ip-192-168-3-251.ap-south-1.compute.internal.4240 &gt; 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8.33926: Flags [P.], seq 1:76, ack 131, win 483, options [nop,nop,TS val 765445635 ecr 2292524425], length 75<br>17:00:27.734520 IP6 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8.33926 &gt; ip-192-168-3-251.ap-south-1.compute.internal.4240: Flags [.], ack 76, win 489, options [nop,nop,TS val 2292524426 ecr 765445635], length 0<br>17:00:27.837174 IP6 ip-192-168-3-251.ap-south-1.compute.internal.39298 &gt; 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8.4240: Flags [P.], seq 697024162:697024293, ack 95598525, win 489, options [nop,nop,TS val 765445738 ecr 2292495211], length 131<br>17:00:27.837728 IP6 ip-192-168-3-251.ap-south-1.compute.internal &gt; 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8: ICMP6, echo request, seq 11795, length 24<br>17:00:27.838225 IP6 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8.4240 &gt; ip-192-168-3-251.ap-south-1.compute.internal.39298: Flags [P.], seq 1:76, ack 131, win 483, options [nop,nop,TS val 2292524530 ecr 765445738], length 75<br>17:00:27.838261 IP6 ip-192-168-3-251.ap-south-1.compute.internal.39298 &gt; 2406:da1a:6ab:c502:ff28:42aa:4356:a6f8.4240: Flags [.], ack 76, win 489, options [nop,nop,TS val 765445739 ecr 2292524530], length 0</pre><ul><li><strong>Network Policy- </strong>When using Cilium, endpoint IP addresses are irrelevant when defining security policies. Instead, you can use the labels assigned to the pods to define security policies. The policies will be applied to the right pods based on the labels, irrespective of where or when they run within the cluster.<br>-The <strong>layer 3 policy</strong> establishes the base connectivity rules regarding which endpoints can talk to each other.<br>-The <strong>layer 4 policy</strong> can be specified independently or independently in addition to the layer 3 policies. It restricts an endpoint’s ability to emit and/or receive packets on a particular port using a particular protocol.<br>-<strong>Layer 7 policy</strong> rules are embedded into <a href="https://docs.cilium.io/en/stable/security/policy/language/#l4-policy">Layer 4 Example</a> rules and can be specified for ingress and egress. A layer 7 request is permitted if at least one of the rules matches. If no rules are specified, then all traffic is permitted. If a layer 4 rule is specified in the policy, and a similar layer 4 rule with layer 7 rules is also specified, then the layer 7 portions of the latter rule will have no effect.<br>-<strong>DNS-based policies</strong> are useful for controlling access to services outside the Kubernetes cluster. IP-based policies are cumbersome and hard to maintain as the IPs associated with external services can change frequently. The Cilium DNS-based policies provide an easy mechanism to specify access control, while Cilium manages the harder aspects of tracking DNS to IP mapping.<br>-Deploy three services: deathstar, xwing, and firefighter &amp; apply specific L3, L4, L7 and DNS policies on them. ( Apply them in succession by following the <a href="https://docs.cilium.io/en/v1.15/gettingstarted/demo/">guide</a>)</li></ul><pre>kubectl create -f https://raw.githubusercontent.com/cilium/cilium/v1.15/examples/minikube/http-sw-app.yaml<br><br>kubectl create -f https://raw.githubusercontent.com/cilium/cilium/v1.15/examples/minikube/sw_l3_l4_policy.yaml</pre><p>-Each pod will be represented in Cilium as an <a href="https://docs.cilium.io/en/v1.15/gettingstarted/terminology/#endpoint">Endpoint</a> in the local cilium agent. Notice the IPv6 addresses.</p><pre> kubectl -n kube-system exec ds/cilium -- cilium-dbg endpoint list<br>Defaulted container &quot;cilium-agent&quot; out of: cilium-agent, config (init), mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), clean-cilium-state (init), install-cni-binaries (init)<br>ENDPOINT   POLICY (ingress)   POLICY (egress)   IDENTITY   LABELS (source:key[=value])                                                  IPv6                          IPv4   STATUS<br>           ENFORCEMENT        ENFORCEMENT<br><br>114        Disabled           Disabled          40016      k8s:app=pod1-worker1                                                         2406:da1a:6ab:c502:f47e::f4          ready<br>                                                           k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=default<br><br>                                                           k8s:io.cilium.k8s.policy.cluster=default<br><br>                                                           k8s:io.cilium.k8s.policy.serviceaccount=default<br><br>                                                           k8s:io.kubernetes.pod.namespace=default<br><br>323        Disabled           Disabled          10876      k8s:app=echoserver                                                           2406:da1a:6ab:c502:f47e::f6          ready<br>                                                           k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=default<br><br>                                                           k8s:io.cilium.k8s.policy.cluster=default<br><br>                                                           k8s:io.cilium.k8s.policy.serviceaccount=default<br><br>                                                           k8s:io.kubernetes.pod.namespace=default<br><br>737        Disabled           Disabled          63303      k8s:app.kubernetes.io/name=deathstar                                         2406:da1a:6ab:c502:f47e::2           ready<br>                                                           k8s:class=deathstar<br><br>                                                           k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=default<br><br>                                                           k8s:io.cilium.k8s.policy.cluster=default<br><br>                                                           k8s:io.cilium.k8s.policy.serviceaccount=default<br><br>                                                           k8s:io.kubernetes.pod.namespace=default<br><br>                                                           k8s:org=empire<br><br>916        Disabled           Disabled          31943      k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=hubble-ui     2406:da1a:6ab:c502:f47e::13          ready<br>                                                           k8s:io.cilium.k8s.policy.cluster=default<br><br>                                                           k8s:io.cilium.k8s.policy.serviceaccount=hubble-ui<br><br>                                                           k8s:io.kubernetes.pod.namespace=hubble-ui<br><br>                                                           k8s:k8s-app=hubble-ui<br><br>1167       Disabled           Disabled          62524      k8s:app=nginx                                                                2406:da1a:6ab:c502:f47e::f5          ready<br>                                                           k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=default<br><br>                                                           k8s:io.cilium.k8s.policy.cluster=default<br><br>                                                           k8s:io.cilium.k8s.policy.serviceaccount=default<br><br>                                                           k8s:io.kubernetes.pod.namespace=default<br><br>1354       Disabled           Disabled          27834      k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=default       2406:da1a:6ab:c502:f47e::f3          ready<br>                                                           k8s:io.cilium.k8s.policy.cluster=default<br><br>                                                           k8s:io.cilium.k8s.policy.serviceaccount=default<br><br>                                                           k8s:io.kubernetes.pod.namespace=default<br><br>                                                           k8s:name=client<br><br>                                                           k8s:post=aks-wg-cilium<br><br>1516       Disabled           Disabled          34852      k8s:app.kubernetes.io/name=hubble-relay                                      2406:da1a:6ab:c502:f47e::            ready<br>                                                           k8s:app.kubernetes.io/part-of=cilium<br><br>                                                           k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=kube-system<br><br>                                                           k8s:io.cilium.k8s.policy.cluster=default<br><br>                                                           k8s:io.cilium.k8s.policy.serviceaccount=hubble-relay<br><br>                                                           k8s:io.kubernetes.pod.namespace=kube-system<br><br>                                                           k8s:k8s-app=hubble-relay<br><br>1564       Disabled           Disabled          4747       k8s:app.kubernetes.io/name=tiefighter                                        2406:da1a:6ab:c502:f47e::1           ready<br>                                                           k8s:class=tiefighter<br><br>                                                           k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=default<br><br>                                                           k8s:io.cilium.k8s.policy.cluster=default<br><br>                                                           k8s:io.cilium.k8s.policy.serviceaccount=default<br><br>                                                           k8s:io.kubernetes.pod.namespace=default<br><br>                                                           k8s:org=empire<br><br>2194       Disabled           Disabled          1          k8s:alpha.eksctl.io/cluster-name=cluster6<br>                         ready<br>                                                           k8s:alpha.eksctl.io/nodegroup-name=pg1-nodegroup<br><br>                                                           k8s:eks.amazonaws.com/capacityType=ON_DEMAND<br><br>                                                           k8s:eks.amazonaws.com/nodegroup-image=ami-03f2bda41403245c5<br><br>                                                           k8s:eks.amazonaws.com/nodegroup=pg1-nodegroup<br><br>                                                           k8s:eks.amazonaws.com/sourceLaunchTemplateId=lt-0194383bfd0d3fbe3<br><br>                                                           k8s:eks.amazonaws.com/sourceLaunchTemplateVersion=1<br><br>                                                           k8s:node.kubernetes.io/instance-type=c5.18xlarge<br><br>                                                           k8s:topology.kubernetes.io/region=ap-south-1<br><br>                                                           k8s:topology.kubernetes.io/zone=ap-south-1c<br><br>                                                           reserved:host</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M1ktgkPjACUuKTsNrRCYyA.png" /></figure><ul><li><strong>Deny traffic using an IPv6 Policy- ICMPv6<br>-</strong>ICMP policy can be specified in addition to layer 3 policies or independently. It restricts the ability of an <a href="https://docs.cilium.io/en/latest/network/kubernetes/ciliumendpoint/">endpoint</a> to emit and/or receive packets on a particular ICMP/ICMPv6 type (currently ICMP/ICMPv6 code is not supported).<br>-The following rule limits all endpoints with the label app=nginx to only be able to emit packets using ICMP with type 8 and ICMPv6 with type 128, to any layer 3 destination:</li></ul><pre>apiVersion: &quot;cilium.io/v2&quot;<br>kind: CiliumNetworkPolicy<br>metadata:<br>  name: &quot;icmp-rule&quot;<br>spec:<br>  endpointSelector:<br>    matchLabels:<br>      app: nginx<br>  egress:<br>  - icmps:<br>    - fields:<br>      - type: 8<br>        family: IPv4<br>      - type: 128<br>        family: IPv6</pre><p>-Using the nginx pod that was created above, first send traffic to an external FQDN/address and see if the traffic is flowing.</p><pre>root@nginx-56fcf95486-df6h7:/# ping6 google.com<br>PING google.com(bom07s35-in-x0e.1e100.net (2404:6800:4009:82c::200e)) 56 data bytes<br>64 bytes from bom07s35-in-x0e.1e100.net (2404:6800:4009:82c::200e): icmp_seq=1 ttl=112 time=1.64 ms<br>64 bytes from bom07s35-in-x0e.1e100.net (2404:6800:4009:82c::200e): icmp_seq=2 ttl=112 time=1.62 ms<br>64 bytes from bom07s35-in-x0e.1e100.net (2404:6800:4009:82c::200e): icmp_seq=3 ttl=112 time=1.61 ms<br>64 bytes from bom07s35-in-x0e.1e100.net (2404:6800:4009:82c::200e): icmp_seq=4 ttl=112 time=1.58 ms<br>64 bytes from bom07s35-in-x0e.1e100.net (2404:6800:4009:82c::200e): icmp_seq=5 ttl=112 time=1.59 ms<br>64 bytes from bom07s35-in-x0e.1e100.net (2404:6800:4009:82c::200e): icmp_seq=6 ttl=112 time=1.61 ms</pre><p>-Let’s apply the ICMPv6 policy and see if the traffic is blocked or not.</p><pre>kubectl apply -f icmp-v6.yaml</pre><p>-Re-run IPv6 traffic (ICMPv6) from the nginx pod and see if the traffic is blocked or not</p><pre>root@nginx-56fcf95486-df6h7:/# ping6 google.com<br>^c</pre><p>-Traffic is blocked as can be seen from Hubble-UI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PGir7x9aCh2VulPuJg86A.png" /></figure><p>-Optionally you can observe traffic being denied from the Hubble CLI.</p><pre>hubble observe --ipv6 --from-pod  nginx-56fcf95486-df6h7<br><br>Sep 23 16:00:54.180: default/nginx-56fcf95486-df6h7:58085 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:00:54.182: default/nginx-56fcf95486-df6h7:55488 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:00:54.185: default/nginx-56fcf95486-df6h7:45549 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:00:54.188: default/nginx-56fcf95486-df6h7:50998 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:00:54.192: default/nginx-56fcf95486-df6h7:41101 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:00:55.193: default/nginx-56fcf95486-df6h7:53335 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:00:56.195: default/nginx-56fcf95486-df6h7:35789 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:00:57.196: default/nginx-56fcf95486-df6h7:32836 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:00:58.197: default/nginx-56fcf95486-df6h7:58610 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:00:59.199: default/nginx-56fcf95486-df6h7:50035 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:00.200: default/nginx-56fcf95486-df6h7:53057 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:01.201: default/nginx-56fcf95486-df6h7:50822 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:02.202: default/nginx-56fcf95486-df6h7:39245 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:03.205: default/nginx-56fcf95486-df6h7:36677 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:04.206: default/nginx-56fcf95486-df6h7:44190 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:05.207: default/nginx-56fcf95486-df6h7:54114 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:06.209: default/nginx-56fcf95486-df6h7:34806 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:07.210: default/nginx-56fcf95486-df6h7:49821 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:08.212: default/nginx-56fcf95486-df6h7:48063 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:09.213: default/nginx-56fcf95486-df6h7:54336 (ID:62524) -&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) to-endpoint FORWARDED (UDP)<br>Sep 23 16:01:27.960: default/nginx-56fcf95486-df6h7:47750 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:01:27.960: default/nginx-56fcf95486-df6h7:47750 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) Policy denied DROPPED (UDP)<br>Sep 23 16:01:27.961: default/nginx-56fcf95486-df6h7:47750 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:01:27.961: default/nginx-56fcf95486-df6h7:47750 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) Policy denied DROPPED (UDP)<br>Sep 23 16:05:41.052: default/nginx-56fcf95486-df6h7:51017 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:05:41.052: default/nginx-56fcf95486-df6h7:51017 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) Policy denied DROPPED (UDP)<br>Sep 23 16:05:41.052: default/nginx-56fcf95486-df6h7:51017 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:05:41.052: default/nginx-56fcf95486-df6h7:51017 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) Policy denied DROPPED (UDP)<br>Sep 23 16:05:46.056: default/nginx-56fcf95486-df6h7:51017 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:05:46.056: default/nginx-56fcf95486-df6h7:51017 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) Policy denied DROPPED (UDP)<br>Sep 23 16:05:46.056: default/nginx-56fcf95486-df6h7:51017 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:05:46.056: default/nginx-56fcf95486-df6h7:51017 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-slbps:53 (ID:6877) Policy denied DROPPED (UDP)<br>Sep 23 16:05:51.061: default/nginx-56fcf95486-df6h7:38764 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:05:51.061: default/nginx-56fcf95486-df6h7:38764 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) Policy denied DROPPED (UDP)<br>Sep 23 16:05:51.061: default/nginx-56fcf95486-df6h7:38764 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:05:51.061: default/nginx-56fcf95486-df6h7:38764 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) Policy denied DROPPED (UDP)<br>Sep 23 16:05:56.066: default/nginx-56fcf95486-df6h7:38764 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:05:56.066: default/nginx-56fcf95486-df6h7:38764 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) Policy denied DROPPED (UDP)<br>Sep 23 16:05:56.066: default/nginx-56fcf95486-df6h7:38764 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) policy-verdict:none EGRESS DENIED (UDP)<br>Sep 23 16:05:56.066: default/nginx-56fcf95486-df6h7:38764 (ID:62524) &lt;&gt; kube-system/coredns-5d5f56f475-b9gqm:53 (ID:6877) Policy denied DROPPED (UDP)</pre><h3>References</h3><ul><li><a href="https://docs.cilium.io/en/v1.13/#getting-started">Getting started with Cilium</a></li><li><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html">Prefix Delegation in AWS</a></li></ul><h3>Try out Cilium</h3><ul><li><a href="https://isovalent.com/resource-library/labs/">Try out Cilium</a> and get a first-hand experience of how it solves some real problems and use-cases in your cloud-native or on-prem environments related to Networking, Security or Observability.</li></ul><h3>🌟Conclusion 🌟</h3><p><strong>Hopefully, this post gave you a good overview of how to set up an EKS cluster on IPv6, use Prefix Delegation for your IPv6 pods and use advanced features from Cilium in IPv6</strong>. Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1fe7735feff" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/cilium-ipv6-in-eks-e1fe7735feff">Cilium: IPv6 in EKS</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cilium: Installing Cilium in GKE with no Kube-Proxy]]></title>
            <link>https://medium.com/all-things-ebpf/cilium-installing-cilium-in-gke-with-no-kube-proxy-826e84f971b4?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/826e84f971b4</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[ebpf]]></category>
            <category><![CDATA[google-kubernetes-engine]]></category>
            <category><![CDATA[cilium]]></category>
            <category><![CDATA[kube-proxy]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Mon, 01 Jul 2024 14:45:06 GMT</pubDate>
            <atom:updated>2024-08-30T05:40:37.050Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*_0zyBhoOjILtLe_r2q_whQ.png" /><figcaption>Source: docs.cilium.io</figcaption></figure><h3>☸ ️Introduction</h3><p>kube-proxy is a component of Kubernetes that handles routing traffic for services within the cluster. kube-proxy is a controller that runs on each worker node in a cluster. It watches Kubernetes Service objects, and creates <a href="https://help.ubuntu.com/community/IptablesHowTo?action=show&amp;redirect=Iptables">iptables</a> rules to forward packets that are sent to Service addresses.</p><p><strong><em>Note- The tutorial has taken the example of GKE dataplane v1 for removing kube-proxy.</em></strong></p><h4>Need for Kube-Proxy:</h4><p>IPtables and Netfilter are the two foundational technologies of kube-proxy for implementing the Service abstraction. They carry legacy accumulated over 20 years of development grounded in more traditional networking environments that are typically far more static than your average Kubernetes cluster. In the age of cloud native, they are no longer the best tool for the job, especially in terms of performance, reliability, scalability, and operations.</p><h4>Cilium to the rescue</h4><p>Cilium’s kube-proxy replacement offers advanced configuration modes to cater to your specific needs. Features like client source IP preservation ensure that your service connections remain intact, while Maglev Consistent Hashing enhances load balancing and resiliency. With support for Direct Server Return (DSR) and Hybrid DSR/SNAT modes, you can optimize traffic routing and improve performance.</p><h3>🎯Goals &amp; Objectives</h3><p>In this article you will learn how GKE-managed kube-proxy can be disabled by automatically bootstrapping GKE nodes with daemonsets and how to install Cilium as the CNI.</p><h3>Pre-Requisites</h3><ul><li>You should have a <a href="https://cloud.google.com/free/?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=japac-IN-all-en-dr-BKWS-all-cloud-trial-EXA-dr-1605216&amp;utm_content=text-ad-none-none-DEV_c-CRE_634320384878-ADGP_Hybrid+%7C+BKWS+-+EXA+%7C+Txt+-GCP-General-gcloud-misc-KWID_43700074993434558-kwd-593698396289&amp;userloc_9061998-network_g&amp;utm_term=KW_google+cloud+subscription&amp;gad_source=1&amp;gclid=CjwKCAjwp4m0BhBAEiwAsdc4aFXJ6SyTDeOWXKOafbf966R_9eA9HiXPLQwsvJck45ztin7VLfbq5RoCIMoQAvD_BwE&amp;gclsrc=aw.ds&amp;hl=en">Google Subscription</a>.</li><li>Install <a href="https://kubernetes.io/releases/download/#kubectl">kubectl</a>.</li><li>Install <a href="https://helm.sh/docs/intro/install/">Helm</a>.</li><li>Install <a href="https://cloud.google.com/sdk/docs/install#linux">gcloud CLI</a>.</li><li>Ensure you have enough <a href="https://cloud.google.com/kubernetes-engine/quotas">quota resources</a> to create a GKE cluster. In the Google Cloud console, go to the <strong>Quotas</strong> page.<br>- The quotas page displays the list of quotas that are prefiltered to GKE quotas.</li><li>Default GKE cluster is running with kube-proxy (See below)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*onbAxJbYpIRSlwQor7Jbng.jpeg" /></figure><ul><li>You can apply a node-init-entrypoint configmap and daemonset in a new or existing GKE cluster <br>-To begin with, create a YAML configuration file with the desired settings:</li></ul><pre>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: node-init-entrypoint<br>  labels:<br>    app: node-init<br>data:<br>  entrypoint.sh: |<br>    #!/usr/bin/env bash<br>    set -euo pipefail<br>    ROOT_MOUNT_DIR=&quot;${ROOT_MOUNT_DIR:-/root}&quot;<br>    rm -f &quot;${ROOT_MOUNT_DIR}/etc/kubernetes/manifests/kube-proxy.manifest&quot;<br>---<br>apiVersion: apps/v1<br>kind: DaemonSet<br>metadata:<br>  name: node-init-node-initializer<br>  labels:<br>    app: node-init<br>spec:<br>  selector:<br>    matchLabels:<br>      app: node-init<br>  updateStrategy:<br>    type: RollingUpdate<br>  template:<br>    metadata:<br>      labels:<br>        app: node-init<br>    spec:<br>      volumes:<br>        - name: root-mount<br>          hostPath:<br>            path: /<br>        - name: entrypoint<br>          configMap:<br>            name: node-init-entrypoint<br>            defaultMode: 0744<br>      initContainers:<br>        - image: ubuntu:18.04<br>          name: node-initializer<br>          command: [&quot;/scripts/entrypoint.sh&quot;]<br>          env:<br>            - name: ROOT_MOUNT_DIR<br>              value: /root<br>          securityContext:<br>            privileged: true<br>          volumeMounts:<br>            - name: root-mount<br>              mountPath: /root<br>            - name: entrypoint<br>              mountPath: /scripts<br>      containers:<br>        - image: &quot;gcr.io/google-containers/pause:2.0&quot;<br>          name: pause</pre><h3>Let’s get going</h3><h4>Set the Project</h4><p>If you have multiple GCP Project, choose the project you want to use.</p><ul><li>Replace Project_ID with your Project.</li></ul><pre>gcloud config set project PROJECT_ID</pre><h4>Create a new cluster and disable kube-proxy</h4><ul><li>Create a GKE cluster using the default VPC (Optional) that exist for the respective region in which you are creating the GKE cluster.<br>- You can create a <a href="https://cloud.google.com/vpc/docs/create-modify-vpc-networks#gcloud">distinct VPC</a> alternatively and use that.</li></ul><pre>gcloud container clusters create amitgag-test-16908 --project ########## --zone us-west2-a --image-type COS_CONTAINERD </pre><h4>Set the Kubernetes Context</h4><p>Log in to the Google cloud portal and browse to Kubernetes Engine &gt; select the respective Kubernetes cluster that was created ( GKE Cluster) and click on connect. This will help you connect to your GKE cluster and set the respective Kubernetes context.</p><pre>gcloud container clusters get-credentials amitgag-test-16908 --zone us-west2-a --project PROJECT_ID</pre><ul><li>Apply thenode-init-entrypoint configmap and daemonset using the yaml file created in the pre-requisites section.</li><li>Check if there are any kube-proxy pods running.</li></ul><pre>kubectl get pods -A -o wide<br>NAMESPACE     NAME                                            READY   STATUS    RESTARTS      AGE    IP            NODE                                                NOMINATED NODE   READINESS GATES<br>default       node-init-node-initializer-jhhmw                1/1     Running   0             83m    10.20.0.164   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>default       node-init-node-initializer-wzkw8                1/1     Running   0             83m    10.20.1.102   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>gmp-system    collector-lm47b                                 2/2     Running   0             83m    10.20.0.240   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>gmp-system    collector-nvvwk                                 2/2     Running   0             83m    10.20.1.206   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>gmp-system    gmp-operator-76676cccf-2h2lp                    1/1     Running   0             83m    10.20.0.55    gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   event-exporter-gke-766bc76558-m9vx8             2/2     Running   0             83m    10.20.0.14    gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   fluentbit-gke-rhp8s                             3/3     Running   0             87m    10.168.0.62   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   fluentbit-gke-tlfgn                             3/3     Running   0             87m    10.168.0.63   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   gke-metrics-agent-9b9w9                         3/3     Running   0             89m    10.168.0.62   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   gke-metrics-agent-lfjxm                         3/3     Running   0             89m    10.168.0.63   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   konnectivity-agent-746646fccf-nhnxd             2/2     Running   0             82m    10.20.0.223   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   konnectivity-agent-746646fccf-skfsw             2/2     Running   0             82m    10.20.1.216   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   konnectivity-agent-autoscaler-67d4f7d5f-tczfw   1/1     Running   0             82m    10.20.0.173   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-dns-5f76555c8f-cj8g6                       5/5     Running   0             82m    10.20.0.96    gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-dns-5f76555c8f-mqqqp                       5/5     Running   0             82m    10.20.1.131   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-dns-autoscaler-79b96f5cb-t9nmd             1/1     Running   0             81m    10.20.1.219   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   l7-default-backend-6484dd554-w4djc              1/1     Running   0             81m    10.20.1.167   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   metrics-server-v0.7.1-6b8d6d8c46-xr985          2/2     Running   0             81m    10.20.1.18    gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   pdcsi-node-7fx8r                                2/2     Running   0             89m    10.168.0.62   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   pdcsi-node-rt6kz</pre><h3>Install Cilium (Optional)</h3><p><strong><em>Note- The tutorial has taken the example of GKE dataplane v1 for removing kube-proxy.</em></strong></p><ul><li><em>You can get the value for </em><em>API_SERVER_IP by logging in to the Google Cloud Console and navigating to &quot;Home&quot; &gt; &quot;Kubernetes Fine&quot; &gt; select the cluster &gt; &quot;External Endpoint&quot;. Set </em><em>API_SERVER_PORT to </em><em>443 as that&#39;s the default port used by GKE to expose the Kubernetes API of GKE clusters.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WY5Fs8skuE0E2c9s74VdXA.png" /></figure><ul><li><em>Taking an example of a GKE instance the values for &lt;k8sServiceHost&gt; and &lt;k8sServicePort&gt; can also be deduced via</em></li></ul><pre>kubectl cluster-info</pre><ul><li>Set up Helm repository</li></ul><pre>helm repo add cilium https://helm.cilium.io/</pre><ul><li>Install <a href="https://docs.cilium.io/en/v1.13/installation/k8s-install-helm/">Cilium</a></li></ul><pre>export API_SERVER_IP=&lt;value obtained above&gt;<br>export API_SERVER_PORT=&lt;value obtained above&gt;<br><br>helm install cilium cilium/cilium --version 1.14.12   --namespace kube-system   --set nodeinit.enabled=true   --set nodeinit.reconfigureKubelet=true   --set nodeinit.removeCbrBridge=true   --set cni.binPath=/home/kubernetes/bin   --set gke.enabled=true   --set ipam.mode=kubernetes   --set ipv4NativeRoutingCIDR=$NATIVE_CIDR --set kubeProxyReplacement=true --set k8sServiceHost=${API_SERVER_IP} --set k8sServicePort=${API_SERVER_PORT}</pre><ul><li>As we can check, kube-proxy is not detected and Cilium takes over completely.</li></ul><pre>kubectl get pods -A -o wide<br>NAMESPACE     NAME                                            READY   STATUS    RESTARTS      AGE    IP            NODE                                                NOMINATED NODE   READINESS GATES<br>default       node-init-node-initializer-jhhmw                1/1     Running   0             83m    10.20.0.164   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>default       node-init-node-initializer-wzkw8                1/1     Running   0             83m    10.20.1.102   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>gmp-system    collector-lm47b                                 2/2     Running   0             83m    10.20.0.240   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>gmp-system    collector-nvvwk                                 2/2     Running   0             83m    10.20.1.206   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>gmp-system    gmp-operator-76676cccf-2h2lp                    1/1     Running   0             83m    10.20.0.55    gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-node-init-jvwv8                          1/1     Running   0             106m   10.168.0.63   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-node-init-lx4w6                          1/1     Running   0             106m   10.168.0.62   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-7676f7459d-68ljf                1/1     Running   3 (93m ago)   106m   10.168.0.62   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-7676f7459d-6m4wr                1/1     Running   3 (93m ago)   106m   10.168.0.63   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-qnjx9                                    1/1     Running   0             106m   10.168.0.62   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-qpp7c                                    1/1     Running   0             106m   10.168.0.63   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   event-exporter-gke-766bc76558-m9vx8             2/2     Running   0             83m    10.20.0.14    gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   fluentbit-gke-rhp8s                             3/3     Running   0             87m    10.168.0.62   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   fluentbit-gke-tlfgn                             3/3     Running   0             87m    10.168.0.63   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   gke-metrics-agent-9b9w9                         3/3     Running   0             89m    10.168.0.62   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   gke-metrics-agent-lfjxm                         3/3     Running   0             89m    10.168.0.63   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   konnectivity-agent-746646fccf-nhnxd             2/2     Running   0             82m    10.20.0.223   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   konnectivity-agent-746646fccf-skfsw             2/2     Running   0             82m    10.20.1.216   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   konnectivity-agent-autoscaler-67d4f7d5f-tczfw   1/1     Running   0             82m    10.20.0.173   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-dns-5f76555c8f-cj8g6                       5/5     Running   0             82m    10.20.0.96    gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-dns-5f76555c8f-mqqqp                       5/5     Running   0             82m    10.20.1.131   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   kube-dns-autoscaler-79b96f5cb-t9nmd             1/1     Running   0             81m    10.20.1.219   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   l7-default-backend-6484dd554-w4djc              1/1     Running   0             81m    10.20.1.167   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   metrics-server-v0.7.1-6b8d6d8c46-xr985          2/2     Running   0             81m    10.20.1.18    gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;<br>kube-system   pdcsi-node-7fx8r                                2/2     Running   0             89m    10.168.0.62   gke-amitgag-test-16908-default-pool-9c763d26-stp3   &lt;none&gt;           &lt;none&gt;<br>kube-system   pdcsi-node-rt6kz                                2/2     Running   0             89m    10.168.0.63   gke-amitgag-test-16908-default-pool-9c763d26-c6d2   &lt;none&gt;           &lt;none&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r6KAw4bQEWnSTQbfVEZ-qw.jpeg" /><figcaption>Cilium is installed witk KPR set to True</figcaption></figure><h3>How can we ensure that kube-proxy is not installed post a Kubernetes version upgrade?</h3><ul><li>You can also optionally validate that kube-proxy is not installed as an add-on a subsequent kubernetes upgrade.</li><li>As you can see in this example below, the GKE cluster is upgraded from k8s version 1.29.4 to k8s version 1.29.6 and we don’t see kube-proxy being enabled as an add-on.<br>- Fetch the respetive versions that are available to which we can <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster#upgrading_the_cluster">upgrade the GKE cluster</a>.</li></ul><pre>gcloud container get-server-config<br>Fetching server config for us-west2-a<br>channels:<br>- channel: RAPID<br>  defaultVersion: 1.30.1-gke.1329000<br>  validVersions:<br>  - 1.30.2-gke.1023000<br>  - 1.30.1-gke.1329000<br>  - 1.29.6-gke.1038000<br>  - 1.29.5-gke.1091000<br>  - 1.28.11-gke.1019000<br>  - 1.28.10-gke.1148000<br>  - 1.28.10-gke.1089000<br>  - 1.27.15-gke.1012000<br>  - 1.27.14-gke.1100000<br>  - 1.27.14-gke.1059000<br>  - 1.26.15-gke.1469000<br>  - 1.26.15-gke.1404000<br>- channel: REGULAR<br>  defaultVersion: 1.29.4-gke.1043002<br>  validVersions:<br>  - 1.29.5-gke.1091000<br>  - 1.29.5-gke.1060000<br>  - 1.29.4-gke.1043002<br>  - 1.28.10-gke.1075000<br>  - 1.28.10-gke.1058000<br>  - 1.28.9-gke.1289000<br>  - 1.27.14-gke.1042000<br>  - 1.27.14-gke.1022000<br>  - 1.27.13-gke.1201000<br>  - 1.26.15-gke.1390000<br>  - 1.26.15-gke.1381000<br>  - 1.26.15-gke.1320000<br>- channel: STABLE<br>  defaultVersion: 1.27.13-gke.1070000<br>  validVersions:<br>  - 1.29.4-gke.1043002<br>  - 1.28.9-gke.1289000<br>  - 1.28.9-gke.1209000<br>  - 1.28.9-gke.1069000</pre><ul><li>Initiate the upgrade</li></ul><pre>gcloud container clusters upgrade amitgag-test-16908 --master --cluster-version  1.29.6-gke.1038000<br>Master of cluster [amitgag-test-16908] will be upgraded from version [1.29.4-gke.1043002] to<br>version [1.29.6-gke.1038000]. This operation is long-running and will block other operations<br>on the cluster (including delete) until it has run to completion.<br><br>Do you want to continue (Y/n)?  Y<br><br>Upgrading amitgag-test-16908...|</pre><ul><li>Validate that the Cilium agent is running in the desired mode</li></ul><pre>kubectl -n kube-system exec ds/cilium -- cilium status | grep KubeProxyReplacement<br><br>Defaulted container &quot;cilium-agent&quot; out of: cilium-agent, config (init), mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), wait-for-node-init (init), clean-cilium-state (init), install-cni-binaries (init)<br>KubeProxyReplacement:    True   [eth0 10.168.0.63 (Direct Routing)]</pre><ul><li>Validate that kube-proxy is not present post the upgrade.</li></ul><pre>kubectl get cm -A<br><br>NAMESPACE            NAME                                                   DATA   AGE<br>default              kube-root-ca.crt                                       1      154m<br>default              node-init-entrypoint                                   1      142m<br>gke-managed-system   kube-root-ca.crt                                       1      154m<br>gmp-public           kube-root-ca.crt                                       1      154m<br>gmp-system           collector                                              1      152m<br>gmp-system           config-images                                          3      153m<br>gmp-system           kube-root-ca.crt                                       1      154m<br>gmp-system           rule-evaluator                                         1      152m<br>gmp-system           rules-generated                                        1      152m<br>kube-node-lease      kube-root-ca.crt                                       1      154m<br>kube-public          kube-root-ca.crt                                       1      154m<br>kube-system          cilium-config                                          105    114m<br>kube-system          cluster-autoscaler-status                              1      154m<br>kube-system          cluster-kubestore                                      0      154m<br>kube-system          clustermetrics                                         0      154m<br>kube-system          core-metrics-exporter-conf                             1      154m<br>kube-system          extension-apiserver-authentication                     6      154m<br>kube-system          fluentbit-gke-config-v1.4.0                            3      154m<br>kube-system          fluentbit-metrics-collector-config-map                 1      154m<br>kube-system          gke-common-webhook-heartbeat                           5      154m<br>kube-system          gke-metrics-agent-conf                                 1      154m<br>kube-system          ingress-uid                                            2      154m<br>kube-system          konnectivity-agent-autoscaler-config                   1      154m<br>kube-system          konnectivity-agent-metrics-collector-config-map        1      154m<br>kube-system          kube-apiserver-legacy-service-account-token-tracking   1      154m<br>kube-system          kube-dns                                               0      154m<br>kube-system          kube-dns-autoscaler                                    1      152m<br>kube-system          kube-root-ca.crt                                       1      154m<br>kube-system          kubedns-config-images                                  5      154m<br>kube-system          kubedns-metrics-collector-config-map                   1      154m<br>kube-system          metrics-server-config                                  1      153m<br>kube-system          prometheus-metrics-collector-config-map                6      154m</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eosdnbVlK72NXa23VI_2Nw.jpeg" /><figcaption>No Kube-Proxy remanants on a successful k8s upgrade</figcaption></figure><h3>References</h3><ul><li><a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/automatically-bootstrapping-gke-nodes-with-daemonsets">Automatically bootstrap GKE nodes with DaemonSets</a><br>- <a href="https://github.com/GoogleCloudPlatform/solutions-gke-init-daemonsets-tutorial/tree/master">GKE Daemonsets tutorial</a></li><li><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/upgrading-a-cluster">Upgrade a GKE cluster</a></li><li><a href="https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-zonal-cluster">Create a GKE cluster in a zone</a></li><li><a href="https://docs.cilium.io/en/v1.13/#getting-started">Getting started with Cilium</a></li><li><a href="https://docs.cilium.io/en/stable/network/kubernetes/kubeproxy-free/#kubernetes-without-kube-proxy">Cilium minus Kube-Proxy</a></li><li><a href="https://www.youtube.com/watch?v=bIRwSIwNHC0">Insights into Kube-Proxy Replacement</a></li></ul><h3>Try out Cilium</h3><ul><li><a href="https://isovalent.com/resource-library/labs/">Try out Cilium</a> and get a first-hand experience of how it solves some real problems and use-cases in your cloud-native or on-prem environments related to Networking, Security or Observability.</li></ul><h3>🌟Conclusion 🌟</h3><p>Hopefully, this post gave you a good overview of how to install Cilium on GKE with no kube-proxy. Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=826e84f971b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/all-things-ebpf/cilium-installing-cilium-in-gke-with-no-kube-proxy-826e84f971b4">Cilium: Installing Cilium in GKE with no Kube-Proxy</a> was originally published in <a href="https://medium.com/all-things-ebpf">eBPFChirp Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Extending a service using Private Link from Azure and securing it with Cilium’s Network Policy]]></title>
            <link>https://medium.com/@amitmavgupta/extending-a-service-using-private-link-from-azure-and-securing-it-with-ciliums-network-policy-ae3248281bbd?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae3248281bbd</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[network-policies]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cilium]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Sun, 31 Mar 2024 11:37:16 GMT</pubDate>
            <atom:updated>2024-04-04T17:00:07.371Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PMGb7vGo9KZj1QULuyQveA.png" /></figure><h3>☸ ️Introduction</h3><p>Azure Private Link enables you to access Azure PaaS Services (for example, Azure Storage and SQL Database) and Azure hosted customer-owned/partner services over a <a href="https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview">private endpoint</a> in your virtual network.</p><p>Traffic between your virtual network and the service travels the Microsoft backbone network. Exposing your service to the public internet is no longer necessary.</p><h3>🎯Goals &amp; Objectives</h3><p>In this article you will learn how to <br>- access an AKS application from users that are outside of your VNet (network) through the use of Private Link Service. <br>- allow users from a specific CIDR block to access the AKS application using Cilium’s Network Policy.</p><h3>Pre-Requisites</h3><ul><li>You should have an <a href="https://aka.ms/freeazure">Azure Subscription</a>.</li><li>Install <a href="https://kubernetes.io/releases/download/#kubectl">kubectl</a>.</li><li>Install <a href="https://helm.sh/docs/intro/install/">Helm</a>.</li><li><a href="https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-peering-overview">VNet peering</a> is in place across two VNet’s.</li><li>An image in the ACR repo (optional)- You can use an existing image as well that is available.</li><li>Ensure you have enough <a href="https://learn.microsoft.com/en-us/azure/aks/quotas-skus-regions">quota resources</a> to create an AKS cluster. Go to the Subscription blade, navigate to “Usage + Quotas”, and make sure you have enough quota for the following resources:<br>-Regional vCPUs<br>-Standard Dv4 Family vCPUs</li></ul><h3>Let’s get going</h3><h4>Create an AKS cluster</h4><p>You can create an AKS cluster using <a href="https://learn.microsoft.com/en-us/azure/aks/use-byo-cni?tabs=azure-cli">BYOCNI</a> or <a href="https://learn.microsoft.com/en-us/azure/aks/azure-cni-powered-by-cilium">Azure CNI powered by Cilium</a>. <br><strong><em>Note</em></strong>- <em>You can also create an </em><a href="https://medium.com/@amitmavgupta/installing-cilium-in-azure-kubernetes-service-byocni-with-no-kube-proxy-825b9007b24b"><em>AKS cluster in BYOCNI in a non kube-proxy</em></a><em> environment.</em></p><ul><li>Set the Subscription</li></ul><p>If you have multiple Azure subscriptions, choose the subscription you want to use.<br>- Replace SubscriptionName with your subscription name.<br>- You can also use your subscription ID instead of your subscription name.</p><pre>az account set --subscription SubscriptionName</pre><ul><li>Set the Kubernetes Context</li></ul><p>Log in to the Azure portal and browse to Kubernetes Services&gt; select the respective Kubernetes service that was created ( AKS Cluster) and click on connect. This will help you connect to your AKS cluster and set the respective Kubernetes context.</p><pre>az aks get-credentials --resource-group &lt;resource-group-name&gt; --name &lt;cluster-name&gt;</pre><p><strong><em>Note- </em></strong><em>The AKS cluster is created in a distinct network range so that there are no overlaps.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_twbctF9m7zNPIBB8tafWw.png" /></figure><ul><li>Install <a href="https://docs.cilium.io/en/v1.14/installation/k8s-install-helm/">Cilium</a> &amp; <a href="https://docs.cilium.io/en/v1.14/gettingstarted/hubble/#hubble-ui">Hubble</a>.</li></ul><pre>helm install cilium cilium/cilium --version 1.14.9 \<br>    --namespace kube-system \<br>    --set aksbyocni.enabled=true \<br>    --set nodeinit.enabled=true<br>    --set hubble.relay.enabled=true \<br>    --set hubble.ui.enabled=true</pre><h4>AKS and Private Link service integration</h4><p>To expose applications and services outside of an AKS cluster, several options are available:</p><ul><li>Ingress controllers</li><li>Application Gateways using AGIC</li><li>Directly through Load Balancers ( LBs could be private or public)</li></ul><p><em>We will expose our application through a private load balancer, and then extend it with a Private Link Service. Ensure that the service principal that is used for creating the AKS cluster has permissions to read/write over the subnet and create an Internal Load Balancer as listed below:</em></p><pre>Microsoft.Network/virtualNetworks/subnets/read<br>Microsoft.Network/loadBalancers/write<br>Microsoft.Network/virtualNetworks/subnets/join/action</pre><h4>Expose the application</h4><ul><li>To create a load balancer from within an AKS cluster, you need to create a Service object of type LoadBalancer, and AKS will create the appropriate load balancer and load balancing rules. <br>- Sample pod and service is shown below:</li></ul><pre>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: pls-app<br>  labels:<br>    app: pls-app<br>spec:<br>  containers:<br>  - image: &quot;testacrrepo.azurecr.io/mycustomimage/nginxamit&quot;<br>    name: pls-app<br>    ports:<br>    - containerPort: 80<br>      protocol: TCP<br><br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: sample-app<br>  annotations:<br>    service.beta.kubernetes.io/azure-load-balancer-internal: &quot;true&quot;<br>spec:<br>  type: LoadBalancer<br>  selector:<br>    app: pls-app<br>  ports:<br>    - name: http<br>      protocol: TCP<br>      port: 80<br>      targetPort: 80</pre><pre>kubectl get pods -o wide<br>NAME                        READY   STATUS    RESTARTS   AGE     IP           NODE                                NOMINATED NODE   READINESS GATES<br>my-nginx-684dd4dcd4-hhkcz   1/1     Running   0          170m    10.0.1.124   aks-nodepool1-11106896-vmss000001   &lt;none&gt;           &lt;none&gt;<br>pls-app                     1/1     Running   0          4d17h   10.0.0.143   aks-nodepool1-11106896-vmss000002   &lt;none&gt;           &lt;none&gt;<br><br>kubectl get svc<br>NAME                 TYPE           CLUSTER-IP    EXTERNAL-IP   PORT(S)        AGE<br>kubernetes           ClusterIP      10.0.0.1      &lt;none&gt;        443/TCP        4d23h<br>pls-app              LoadBalancer   10.0.167.20   10.224.0.7    80:32673/TCP   4d17h</pre><ul><li>This service is now accesible from the respective VNet where the resource group of the AKS cluster is residing. You can reach the service over its cluster-IP as well as its external IP which is an internal IP from the same subnet.</li></ul><pre>root@my-nginx-684dd4dcd4-hhkcz:/# curl http://10.0.167.20<br>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>   &lt;body style=&quot;background-color:rgb(220, 240, 234);&quot;&gt;<br>      &lt;h1&gt;Welcome to NGINX by Amit&lt;/h1&gt;<br>      &lt;h2&gt;Azure Demo Repo for ACR and AKS&lt;/h2&gt;<br>      &lt;h2&gt;Application Demo&lt;/h2&gt;<br>   &lt;/body&gt;<br>&lt;/html&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U9tVA4shJSilwq_RaH0BFw.png" /></figure><h4>Access the application from a peered network</h4><ul><li>Create another VNet and call it as pls-vnet network.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmOGpFxglp-3qQghEBzksg.png" /></figure><ul><li>Create a <a href="https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu">VM</a> in pls-vnet and establish VNet peering between the two networks (Network where the AKS cluster has been created and the pls-vnet network).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Im7CZyhvWLgw2HCxKv_oAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NYBnVIM2aeenij5rYVRggg.png" /></figure><ul><li>You should be able to access the service from this peered VNet as well over the <em>Load Balancer’s external-IP</em>.</li></ul><pre>root@pls-vm:/home/plsvm# ip a<br>1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000<br>    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br>    inet 127.0.0.1/8 scope host lo<br>       valid_lft forever preferred_lft forever<br>    inet6 ::1/128 scope host<br>       valid_lft forever preferred_lft forever<br>2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc mq state UP group default qlen 1000<br>    link/ether 00:0d:3a:86:72:51 brd ff:ff:ff:ff:ff:ff<br>    inet 10.221.1.4/26 brd 10.221.1.63 scope global eth0<br>       valid_lft forever preferred_lft forever<br>    inet6 fe80::20d:3aff:fe86:7251/64 scope link<br>       valid_lft forever preferred_lft forever<br><br>root@pls-vm:/home/plsvm# root@mtenantplsvm:/home/plsvm# curl http://10.224.0.7<br>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>   &lt;body style=&quot;background-color:rgb(220, 240, 234);&quot;&gt;<br>      &lt;h1&gt;Welcome to NGINX by Amit&lt;/h1&gt;<br>      &lt;h2&gt;Azure Demo Repo for ACR and AKS&lt;/h2&gt;<br>      &lt;h2&gt;Application Demo&lt;/h2&gt;<br>   &lt;/body&gt;<br>&lt;/html&gt;</pre><h3>Expose the application through Private Link Service</h3><ul><li>Create another VNet (mtenantpls) and try to access the application from that VNet. This will obviously fail as there is no VNet peering or anything has been set-up for communication where in the application is residing.</li><li>To make the application available through Private Link Service, annotate the Service with specific annotations. The only required annotation is the azure-pls-create annotation which indicates that this service should be exposed using Private Link Service.</li></ul><p><strong><em>Note- </em></strong><em>Notice the annotations in use</em>:</p><pre> service.beta.kubernetes.io/azure-load-balancer-internal: &quot;true&quot;<br> service.beta.kubernetes.io/azure-pls-create: &quot;true&quot;<br> service.beta.kubernetes.io/azure-pls-name: pls-app</pre><ul><li>Once the setup is complete you can find your Private Link service and an associated NIC within the AKS managed resource group.</li><li>Create the Private Endpoint<br>- On mtenantpls VNet, create a private endpoint pointing to the Private link service to make the private connectivity to the service live.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgetVlYJEk1elTxIB2F9gA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZZ5JAGNe15M15tYCmXsaMA.png" /></figure><ul><li>Take note of the Private IP of the private endpoint connection.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ll2ac8W_fn7iSKrpBR_JHA.png" /></figure><ul><li>You should be able to access the <strong>service</strong> that was created with the pls annotation although it will be accesible on the <strong><em>Private IP</em></strong> that was created for the private endpoint connection.</li></ul><pre>root@mtenantplsvm:/home/plsvm# curl http://10.0.0.5<br>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>   &lt;body style=&quot;background-color:rgb(220, 240, 234);&quot;&gt;<br>      &lt;h1&gt;Welcome to NGINX by Amit&lt;/h1&gt;<br>      &lt;h2&gt;Azure Demo Repo for ACR and AKS&lt;/h2&gt;<br>      &lt;h2&gt;Application Demo&lt;/h2&gt;<br>   &lt;/body&gt;<br>&lt;/html&gt;</pre><h3>Cilium Network Policy</h3><p>When using Cilium, endpoint IP addresses are irrelevant when defining security policies. Instead, you can use the labels assigned to the pods to define security policies. The policies will be applied to the right pods based on the labels, irrespective of where or when they run within the cluster.</p><p>The layer 3 policy establishes the base connectivity rules regarding which endpoints can talk to each other.</p><ul><li>Create a policy that doesn’t allow anyone apart from the allowed networks to access the service.</li></ul><pre>apiVersion: networking.k8s.io/v1<br>kind: NetworkPolicy<br>metadata:<br>  name: example-ipblock<br>spec:<br>  podSelector: {}<br>  policyTypes:<br>    - Egress<br>  egress:<br>    - to:<br>      - ipBlock:<br>          cidr: 10.221.1.0/24</pre><ul><li>Create a policy that doesn’t allow any access to the service.</li></ul><pre>kind: NetworkPolicy<br>metadata:<br>  name: example-ipblock<br>spec:<br>  podSelector: {}<br>  policyTypes:<br>    - Ingress<br>    - Egress<br>  ingress: []<br>  egress:<br>    - to:<br>        - ipBlock:<br>            cidr: 10.0.0.0/24</pre><pre>kubectl apply -f netpol_pls_drop.yaml<br>networkpolicy.networking.k8s.io/example-ipblock created</pre><ul><li>Requests towards the service should start failing and you can check ‘Dropped’ flows on Hubble.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q3bc-k7lbtXZ32REiI-rEQ.png" /></figure><h3>Optional Metrics</h3><p>You can view Private Link Service and Private Endpoint stats using standard workbooks provided under the respective Private Link Service Insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WNyyEkJ-9-YDfPAbQPalrg.png" /></figure><h3>References</h3><ul><li><a href="https://docs.cilium.io/en/v1.14/installation/k8s-install-helm/">Installing Cilium</a></li><li><a href="https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-overview">Private endpoint</a></li><li><a href="https://learn.microsoft.com/en-us/azure/private-link/private-link-service-overview">Private Link Service</a></li><li><a href="https://cloud-provider-azure.sigs.k8s.io/topics/pls-integration/">Azure Private Link Service Integration</a></li></ul><h3>Try out Cilium</h3><ul><li><a href="https://isovalent.com/resource-library/labs/">Try out Cilium</a> and get a first-hand experience of how it solves some real problems and use-cases in your cloud-native or on-prem environments related to Networking, Security or Observability.</li></ul><h3>🌟Conclusion 🌟</h3><p>Hopefully, this post gave you a good overview of how to expose a service privately using the Private Link Service integration. Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae3248281bbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cilium: Installing Cilium in EKS with no Kube-Proxy]]></title>
            <link>https://awstip.com/cilium-installing-cilium-in-eks-with-no-kube-proxy-86f54a56c360?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/86f54a56c360</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[elastickubernetesservice]]></category>
            <category><![CDATA[ebpf]]></category>
            <category><![CDATA[cilium]]></category>
            <category><![CDATA[kube-proxy]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Thu, 21 Mar 2024 03:05:07 GMT</pubDate>
            <atom:updated>2025-07-21T15:03:15.255Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*_0zyBhoOjILtLe_r2q_whQ.png" /><figcaption>Source: docs.cilium.io</figcaption></figure><h3>☸ ️Introduction</h3><p>kube-proxy is a component of Kubernetes that handles routing traffic for services within the cluster. There are two backends available for Layer 3/4 load balancing in upstream kube-proxy - iptables and IPVS.</p><h4>Need for Kube-Proxy:</h4><p>IPtables and Netfilter are the two foundational technologies of kube-proxy for implementing the Service abstraction. They carry legacy accumulated over 20 years of development grounded in more traditional networking environments that are typically far more static than your average Kubernetes cluster. In the age of cloud native, they are no longer the best tool for the job, especially in terms of performance, reliability, scalability, and operations.</p><h4>Cilium to the rescue</h4><p>Cilium’s kube-proxy replacement offers advanced configuration modes to cater to your specific needs. Features like client source IP preservation ensure that your service connections remain intact, while Maglev Consistent Hashing enhances load balancing and resiliency. With support for Direct Server Return (DSR) and Hybrid DSR/SNAT modes, you can optimize traffic routing and improve performance.</p><h3>🎯Goals &amp; Objectives</h3><p>In this article you will learn how the EKS-managed kube-proxy DaemonSet can also be disabled entirely to install Cilium as the CNI on an EKS cluster with a managed nodegroup.</p><h3>Pre-Requisites</h3><ul><li>You should have an <a href="https://portal.aws.amazon.com/billing/signup?pg=premsprice&amp;cta=herobtn&amp;redirect_url=https%3A%2F%2Faws.amazon.com%2Fregistration-confirmation#/start/email">AWS subscription</a>.</li><li>Install <a href="https://kubernetes.io/releases/download/#kubectl">kubectl</a></li><li>Install <a href="https://helm.sh/docs/intro/install/">Helm</a></li><li>The following <a href="https://docs.cilium.io/en/v1.13/network/concepts/ipam/eni/#required-privileges">EC2 privileges</a> are required by the Cilium operator in order to perform ENI creation and IP allocation.</li><li>Install <a href="https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html">eksctl</a></li><li>Install <a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html">awscli</a></li><li>Cilium CLI: Cilium provides <a href="https://docs.cilium.io/en/stable/gettingstarted/k8s-install-default/#install-the-cilium-cli">Cilium CLI</a> tool that automatically collects all the logs and debug information needed to troubleshoot your Cilium installation. You can install Cilium CLI for Linux, macOS, or other distributions on their local machine(s) or server(s).</li></ul><h3>Let’s get going</h3><p>kube-proxy maintains network rules on each Amazon EC2 node. It enables network communication to your Pods. The self-managed or managed type of this add-on is installed on each Amazon EC2 node in your cluster, by default.</p><p><strong>Note- <em>With awscli version 0.186.0 and above and kubernetes 1.29 onwards you can create an EKS cluster minus the default AWS add-on’s namely AWS-VPC-CNI, Kube-Proxy and Core-DNS. Thanks to </em></strong><a href="https://medium.com/u/e54dc80a5112"><strong><em>Marco Aurelio Caldas Miranda</em></strong></a><strong><em> for the hat tip. You can read more about this here- </em></strong><a href="https://isovalent.com/blog/post/eks-isovalent-enterprise-for-cilium/">https://isovalent.com/blog/post/eks-isovalent-enterprise-for-cilium/</a></p><h4>Create a new cluster and disable kube-proxy.</h4><ul><li>Create sample configuration file and name it eks-config_ipv4.yaml<br>-<strong><em>Note- </em></strong>you can create an EKS cluster from the command line utility as well.<br>-managedNodeGroups should be tainted with node.cilium.io/agent-not-ready=true:NoExecute to ensure application pods will only be scheduled once Cilium is ready to manage them.</li></ul><pre>apiVersion: eksctl.io/v1alpha5<br>kind: ClusterConfig<br><br>metadata:<br>  name: cluster1<br>  region: ap-southeast-2<br>  version: &quot;1.27&quot;<br><br>managedNodeGroups:<br>- name: ng-1<br>  desiredCapacity: 2<br>  privateNetworking: true<br>  # taint nodes so that application pods are<br>  # not scheduled/executed until Cilium is deployed.<br>  # Alternatively, see the note below.<br>  taints:<br>   - key: &quot;node.cilium.io/agent-not-ready&quot;<br>     value: &quot;true&quot;<br>     effect: &quot;NoExecute&quot;</pre><ul><li>Create the EKS cluster using the configuration file created in the previous step</li></ul><pre>eksctl create cluster -f eks-config_ipv4.yaml</pre><ul><li>Once the cluster is up and running; ensure that all the nodes are up and in a healthy state.</li></ul><pre> kubectl get nodes -o wide<br>NAME                                                STATUS   ROLES    AGE     VERSION               INTERNAL-IP      EXTERNAL-IP   OS-IMAGE         KERNEL-VERSION                  CONTAINER-RUNTIME<br>ip-192-168-105-179.ap-southeast-2.compute.internal  Ready    &lt;none&gt;   4d17h   v1.28.5-eks-5e0fdde   192.168.105.179   &lt;none&gt;        Amazon Linux 2   5.10.210-201.852.amzn2.x86_64   containerd://1.7.11<br>ip-192-168-97-26.ap-southeast-2.compute.internal    Ready    &lt;none&gt;   4d17h   v1.28.5-eks-5e0fdde   192.168.147.228   &lt;none&gt;        Amazon Linux 2   5.10.210-201.852.amzn2.x86_64   containerd://1.7.11</pre><h4>Delete the kube-proxy daemonset and configmap</h4><ul><li>For existing installations with kube-proxy running as a DaemonSet, remove it by using the following commands.</li></ul><pre>kubectl -n kube-system delete ds kube-proxy<br><br>kubectl -n kube-system delete cm kube-proxy</pre><ul><li>Ensure that kube-proxy is no longer running as a daemonset.</li></ul><pre>kubectl get ds -A<br>NAMESPACE     NAME       DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR                     AGE<br>kube-system   aws-node   0         0         0       0            0           io.cilium/aws-node-enabled=true   8d<br>kube-system   cilium     2         2         2       2            2           kubernetes.io/os=linux            17h<br><br>kubectl get cm -A<br>NAMESPACE         NAME                                                   DATA   AGE<br>default           kube-root-ca.crt                                       1      8d<br>kube-node-lease   kube-root-ca.crt                                       1      8d<br>kube-public       kube-root-ca.crt                                       1      8d<br>kube-system       amazon-vpc-cni                                         2      8d<br>kube-system       aws-auth                                               1      8d<br>kube-system       cilium-config                                          105    17h<br>kube-system       coredns                                                1      8d<br>kube-system       extension-apiserver-authentication                     6      8d<br>kube-system       kube-apiserver-legacy-service-account-token-tracking   1      8d<br>kube-system       kube-root-ca.crt                                       1      8d</pre><h4>Remove kube-proxy iptable entires from each node</h4><ul><li>With root permissions ensure that iptable entries pertinent to kube-proxy are removed. <br>- This is done to clear out AWS-VPC-CNI related rules.</li></ul><pre>iptables-save | grep -v KUBE | iptables-restore<br><br>iptables-save | grep -E -v &#39;AWS-SNAT-CHAIN|AWS-CONNMARK-CHAIN&#39; | iptables-restore</pre><p><strong><em>Note</em></strong><em>- Updated as of 27/06/2024 with inputs from Isovalent team member- Scott Lowe.</em></p><p><em>If you provision an EKS cluster without the AWS-VPC-CNI plugin, then you don’t need to do the above step.</em></p><h4>Install Cilium</h4><ul><li>You can install Cilium in either <a href="https://docs.cilium.io/en/v1.13/installation/k8s-install-helm/#install-cilium">ENI</a> mode or <a href="https://docs.cilium.io/en/v1.13/installation/k8s-install-helm/#install-cilium">Overlay</a> mode on an EKS cluster.</li><li>In case of ENI mode, Cilium will manage ENIs instead of VPC CNI, so the aws-node DaemonSet has to be patched to prevent conflict behavior.</li></ul><pre>kubectl -n kube-system patch daemonset aws-node --type=&#39;strategic&#39; -p=&#39;{&quot;spec&quot;:{&quot;template&quot;:{&quot;spec&quot;:{&quot;nodeSelector&quot;:{&quot;io.cilium/aws-node-enabled&quot;:&quot;true&quot;}}}}}&#39;</pre><ul><li>Make sure you correctly set your API_SERVER_IP and API_SERVER_PORT by using:</li></ul><pre>kubectl cluster-info</pre><ul><li>Set up Helm repository</li></ul><pre>helm repo add cilium https://helm.cilium.io/</pre><ul><li>Install Cilium using helm</li></ul><pre>API_SERVER_IP=&lt;your_api_server_FQDN&gt;<br>API_SERVER_PORT=&lt;your_api_server_port&gt;<br><br>helm install cilium cilium/cilium --version 1.14.8 \<br>  --namespace kube-system \<br>  --set eni.enabled=true \<br>  --set ipam.mode=eni \<br>  --set egressMasqueradeInterfaces=eth0 \<br>  --set routingMode=native \<br>  --set kubeProxyReplacement=true \<br>  --set k8sServiceHost=${API_SERVER_IP} \<br>  --set k8sServicePort=${API_SERVER_PORT}</pre><ul><li>Validate that the Cilium agent is running in the desired mode</li></ul><pre>kubectl -n kube-system exec ds/cilium -- cilium status | grep KubeProxyReplacement<br>Defaulted container &quot;cilium-agent&quot; out of: cilium-agent, config (init), mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), clean-cilium-state (init), install-cni-binaries (init)<br>KubeProxyReplacement:    True   [eth0 192.168.105.179 (Direct Routing)]</pre><ul><li>Create a sample service (100 in number)</li></ul><pre>for x in {1..100}; do yq -i &#39; .metadata.name = &quot;nginx-svc-&#39;$x&#39;&quot; &#39; service.yaml | kubectl apply  -f service.yaml ;done <br>service/nginx-svc-1 unchanged<br>service/nginx-svc-2 unchanged<br>service/nginx-svc-3 created<br>service/nginx-svc-4 created<br>service/nginx-svc-5 created<br>service/nginx-svc-6 created<br>service/nginx-svc-7 created<br>service/nginx-svc-8 created<br>service/nginx-svc-9 created<br>[]<br>service/nginx-svc-89 created<br>service/nginx-svc-90 created<br>service/nginx-svc-91 created<br>service/nginx-svc-92 created<br>service/nginx-svc-93 created<br>service/nginx-svc-94 created<br>service/nginx-svc-95 created<br>service/nginx-svc-96 created<br>service/nginx-svc-97 created<br>service/nginx-svc-98 created<br>service/nginx-svc-99 created<br>service/nginx-svc-100 created</pre><ul><li>Check the EKS nodes for any iptable entries related to kube-proxy</li></ul><pre>[root@ip-192-168-105-79 /]# iptables-save | grep -c KUBE-SVC<br>0<br>[root@ip-192-168-147-228 /]# iptables-save | grep -c KUBE-SEP<br>0</pre><h4>How can we ensure that kube-proxy is not installed post a Kubernetes version upgrade?</h4><ul><li>You can also optionally validate that kube-proxy is not installed as an add-on a subsequent kubernetes upgrade.</li><li>As you can see in this example below, the EKS cluster is upgraded from k8s version 1.27 to k8s version 1.29 and we don’t see kube-proxy being enabled as an add-on.</li></ul><pre>eksctl upgrade cluster --name cluster1 --region ap-southeast-2 --version 1.29 --approve<br><br>eksctl get nodegroup ng-1 --region ap-southeast-2 --cluster=cluster1<br>CLUSTER  NODEGROUP STATUS CREATED   MIN SIZE MAX SIZE DESIRED CAPACITY INSTANCE TYPE IMAGE ID ASG NAME     TYPE<br>cluster1 ng-1  ACTIVE 2024-03-10T16:13:06Z 2  2  2   m5.large AL2_x86_64 eks-ng-1-54c71491-cd91-5c20-0e4c-bb39fea7a7b7 managed<br><br>eksctl upgrade nodegroup \<br>  --name=ng-1 \<br>  --cluster=cluster1 \<br>  --region=ap-southeast-2 \<br>  --kubernetes-version=1.29</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9R2fgQeKfwrz1rFPVtbMIg.png" /></figure><ul><li>Validate that the Cilium agent is running in the desired mode</li></ul><pre>kubectl -n kube-system exec ds/cilium -- cilium status | grep KubeProxyReplacement<br>Defaulted container &quot;cilium-agent&quot; out of: cilium-agent, config (init), mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), clean-cilium-state (init), install-cni-binaries (init)<br>KubeProxyReplacement:    True   [eth0 192.168.177.57 (Direct Routing)]</pre><ul><li>Validate that kube-proxy is not present as a daemonset post the upgrade.</li></ul><pre>kubectl get ds -A<br>NAMESPACE     NAME       DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR                     AGE<br>kube-system   aws-node   0         0         0       0            0           io.cilium/aws-node-enabled=true   8d<br>kube-system   cilium     2         2         2       2            2           kubernetes.io/os=linux            19h<br><br>kubectl get cm -A<br>NAMESPACE         NAME                                                   DATA   AGE<br>default           kube-root-ca.crt                                       1      8d<br>kube-node-lease   kube-root-ca.crt                                       1      8d<br>kube-public       kube-root-ca.crt                                       1      8d<br>kube-system       amazon-vpc-cni                                         2      8d<br>kube-system       aws-auth                                               1      8d<br>kube-system       cilium-config                                          105    19h<br>kube-system       coredns                                                1      8d<br>kube-system       extension-apiserver-authentication                     6      8d<br>kube-system       kube-apiserver-legacy-service-account-token-tracking   1      8d<br>kube-system       kube-root-ca.crt                                       1      8d</pre><h3>References</h3><ul><li><a href="https://eksctl.io/usage/addons/#cluster-creation-flexibility-for-default-networking-addons">Create an EKS cluster without the default add-ons</a></li><li><a href="https://isovalent.com/blog/post/eks-isovalent-enterprise-for-cilium/">Isovalent adds support for EKS with a BYOCNI approach</a></li><li><a href="https://docs.cilium.io/en/v1.14/network/kubernetes/kubeproxy-free/#kubeproxy-free">Kubernetes without kube-proxy</a></li><li><a href="https://docs.cilium.io/en/v1.14/installation/k8s-install-helm/">Installing Cilium</a></li><li><a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html">EKS add-ons</a></li></ul><h3>Try out Cilium</h3><ul><li><a href="https://isovalent.com/resource-library/labs/">Try out Cilium</a> and get a first-hand experience of how it solves some real problems and use-cases in your cloud-native or on-prem environments related to Networking, Security or Observability.</li></ul><h3>🌟Conclusion 🌟</h3><p>Hopefully, this post gave you a good overview of how to install Cilium on EKS in ENI or Overlay mode with no kube-proxy. Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86f54a56c360" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/cilium-installing-cilium-in-eks-with-no-kube-proxy-86f54a56c360">Cilium: Installing Cilium in EKS with no Kube-Proxy</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cilium, Azure, RKE2 & Terraform: let’s call it CART]]></title>
            <link>https://medium.com/@amitmavgupta/cilium-azure-rke2-terraform-lets-call-it-cart-f4c0b8dadf4e?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4c0b8dadf4e</guid>
            <category><![CDATA[cilium]]></category>
            <category><![CDATA[rke2]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[rancher]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Mon, 11 Mar 2024 11:45:57 GMT</pubDate>
            <atom:updated>2026-02-25T09:22:40.411Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cilium, Azure, Rancher &amp; Terraform</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2SzLWZh8vXhsOlCK7D-GQ.png" /></figure><h3>☸ ️Introduction</h3><p>Rancher is a container management platform built for organizations that deploy containers in production. Rancher makes it easy to run Kubernetes everywhere, meet IT requirements, and empower DevOps teams. Add to that Cilium which isn’t just another Container Networking Interface (CNI). It’s a versatile solution that offers a wide range of features, from load balancing to providing egress gateways.</p><h3>🎯Goals &amp; Objectives</h3><p>The following blog will quickly deploy a Rancher server on Azure (using Terraform) in a single-node K3s Kubernetes cluster, with a single-node downstream Kubernetes cluster attached. You can then create a new cluster and run Cilium as the default CNI on it.</p><p><strong><em>Note- This will install the Cilium version that RKE has customized from upstream Cilium. This would not have all the features that are available in the Enterprise version of cilium (from Isovalent).</em></strong></p><h3>Pre-Requisites</h3><ul><li>A (virtual) machine with SSH access keys — referred as <strong>rke-node<br></strong>Minimum: 2GB RAM / 1 vCPU<br>Recommendation: 4GB RAM / 2 vCPU</li><li>To operate properly, Rancher requires a number of <a href="https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/installation-requirements/port-requirements#downstream-kubernetes-cluster-nodes">ports</a> to be open on Rancher nodes and on downstream Kubernetes cluster nodes.</li><li>You should have an <a href="https://aka.ms/freeazure">Azure Subscription</a></li><li>Install <a href="https://developer.hashicorp.com/terraform/tutorials/azure-get-started/azure-build">Terraform CLI</a></li><li>Install <a href="https://kubernetes.io/releases/download/#kubectl">kubectl</a></li><li>Install <a href="https://docs.cilium.io/en/stable/gettingstarted/k8s-install-default/#install-the-cilium-cli">Cilium CLI</a></li><li>You will need the following permissions in the Resource Group where you are creating the AKS cluster.</li></ul><pre>Microsoft.Resources/subscriptions/resourcegroups/write<br>Microsoft.Resources/subscriptions/resourcegroups/read<br>Microsoft.Network/publicIPAddresses/write<br>Microsoft.Network/virtualNetworks/write<br>Microsoft.Compute/virtualMachines/write</pre><ul><li>Ensure you have enough <a href="https://learn.microsoft.com/en-us/azure/aks/quotas-skus-regions">quota resources</a> to create an AKS cluster. Go to the Subscription blade, navigate to “Usage + Quotas”, and make sure you have enough quota for the following resources:<br>-Regional vCPUs<br>-Standard Dv4 Family vCPUs</li></ul><h3>Let’s get going</h3><h4>Prepare the Virtual Machine</h4><ul><li>Create a Virtual Machine in Azure. This machine will be added as a kubernetes node in the RKE cluster and will be running with Cilium as the CNI.</li><li>The virtual machine in this case is based out of Ubuntu 22.04.</li><li>Install <a href="https://medium.com/r?url=https%3A%2F%2Fkubernetes.io%2Freleases%2Fdownload%2F%23kubectl">Kubectl</a></li></ul><h4>Create the Rancher server in Azure using Terraform</h4><p>You can deploy this on AWS, GCP and <a href="https://ranchermanager.docs.rancher.com/getting-started/quick-start-guides/deploy-rancher-manager">other</a> cloud providers as well.</p><ul><li>Clone <a href="https://github.com/rancher/quickstart">Rancher Quickstart</a> to a folder using git clone <a href="https://github.com/rancher/quickstart.">https://github.com/rancher/quickstart.</a></li><li>Go into the Azure folder containing the Terraform files by executing cd quickstart/rancher/azure.</li><li>Rename the terraform.tfvars.example file to terraform.tfvars.</li><li>Edit terraform.tfvars and customize the following variables:<br>azure_subscription_id - Microsoft Azure Subscription ID<br>azure_client_id - Microsoft Azure Client ID<br>azure_client_secret - Microsoft Azure Client Secret<br>azure_tenant_id - Microsoft Azure Tenant ID<br>rancher_server_admin_password - Admin password for created Rancher server (minimum 12 characters)</li><li>Optional: Modify optional variables within terraform.tfvars. azure_location - Microsoft Azure region, choose the closest instead of the default (East US)<br>prefix - Prefix for all created resources<br>instance_type - Compute instance size used, minimum is Standard_DS2_v2 but Standard_DS2_v3 or Standard_DS3_v2 could be used if within budget.</li><li>Run terraform init.</li><li>Run terraform fmt to rewrite Terraform configuration files to a canonical format and style.</li><li>Run terraform validate to validates the configuration files in athe directory, referring only to the configuration,</li><li>To initiate the creation of the environment, run terraform apply --auto-approve. Then wait for output similar to the following:</li></ul><pre>Apply complete! Resources: 18 added, 0 changed, 0 destroyed.<br><br>Outputs:<br><br>rancher_node_ip = 20.163.x.x<br>rancher_server_url = https://rancher.20.163.x.x.sslip.io<br>workload_node_ip = yy.yy.yy.yy</pre><ul><li>Paste the rancher_server_url from the output above into the browser. Log in when prompted (default username is admin, use the password set in rancher_server_admin_password).</li></ul><h4>Create the RKE cluster</h4><ul><li>Login to the Rancher UI.</li><li>In Rancher UI, navigate to the Clusters page. In the top right, click on the Add Cluster box to create a new cluster.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*GeTh3t8akuobN-Ge9cys1A.png" /></figure><ul><li>On the Add Cluster page select to create a new cluster from Existing Nodes:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mToKy0GLmOAR-06P5u85Ow.png" /></figure><ul><li>On the Add Cluster page that opens, provide a name for the cluster.</li><li>Select the Kubernetes Version as the latest from the dropdown. <br>For this blog, let’s proceed with 1.27.11</li><li>Select the Container Networkas Cilium</li><li>Click on Create</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dLHIjDLBljAH9umNx-udFA.png" /></figure><ul><li>For registering the rke-node to Rancher server, copy the registration command from the Rancher UI and execute it on the rke-node</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPoJhLsVzom-V1kds_24YQ.png" /></figure><ul><li>On the rke-node</li></ul><pre>curl https://rancher.20.163.x.x.sslip.io/system-agent-install.sh | sudo  sh -s - --server https://rancher.20.163.x.x.sslip.io --label &#39;cattle.io/os=linux&#39; --token ####################################################### --ca-checksum ####################################################### --etcd --controlplane --worker<br>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br>                                 Dload  Upload   Total   Spent    Left  Speed<br>100 30887    0 30887    0     0  21040      0 --:--:--  0:00:01 --:--:-- 21040<br>[INFO]  Label: cattle.io/os=linux<br>[INFO]  Role requested: etcd<br>[INFO]  Role requested: controlplane<br>[INFO]  Role requested: worker<br>[INFO]  Using default agent configuration directory /etc/rancher/agent<br>[INFO]  Using default agent var directory /var/lib/rancher/agent<br>[INFO]  Determined CA is necessary to connect to Rancher<br>[INFO]  Successfully downloaded CA certificate<br>[INFO]  Value from https://rancher.20.163.x.x.sslip.io/cacerts is an x509 certificate<br>[INFO]  Successfully tested Rancher connection<br>[INFO]  Rancher System Agent was detected on this host. Ensuring the rancher-system-agent is stopped.<br>[INFO]  Downloading rancher-system-agent binary from https://rancher.20.163.x.x.sslip.io/assets/rancher-system-agent-amd64<br>[INFO]  Successfully downloaded the rancher-system-agent binary.<br>[INFO]  Downloading rancher-system-agent-uninstall.sh script from https://rancher.20.163.x.x.sslip.io/assets/system-agent-uninstall.sh<br>[INFO]  Successfully downloaded the rancher-system-agent-uninstall.sh script.<br>[INFO]  Generating Cattle ID<br>[INFO]  Cattle ID was already detected as #######################################################.<br>[INFO]  Successfully downloaded Rancher connection information<br>[INFO]  systemd: Creating service file<br>[INFO]  Creating environment file /etc/systemd/system/rancher-system-agent.env<br>[INFO]  Enabling rancher-system-agent.service<br>[INFO]  Starting/restarting rancher-system-agent.service</pre><ul><li>The rke-node will take atleast 5–10 minutes to register to the rancher server.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vc9FC6zJs_poy4oq5b0VeA.png" /></figure><ul><li>Copy or download the kubectl config file to check the status of the nodes and pods on the rke-node</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*utvmvgeUwDpW07SKIORDPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1xVTfn3Cv0QITESeF9hYFA.png" /></figure><ul><li>On the rke-node</li></ul><pre>export KUBECONFIG=/home/rkenode/config.yml<br><br>kubectl get nodes -A -o wide<br>NAME       STATUS   ROLES                              AGE   VERSION           INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION      CONTAINER-RUNTIME<br>rke-node   Ready    control-plane,etcd,master,worker   20h   v1.27.11+rke2r1   10.0.0.5      &lt;none&gt;        Ubuntu 20.04.6 LTS   5.15.0-1053-azure   containerd://1.7.11-k3s2<br><br>kubectl get pods -A -o wide<br>NAMESPACE             NAME                                                   READY   STATUS      RESTARTS   AGE   IP            NODE       NOMINATED NODE   READINESS GATES<br>cattle-fleet-system   fleet-agent-7f9ccfb8b-7hd9g                            1/1     Running     0          20h   10.42.0.143   rke-node   &lt;none&gt;           &lt;none&gt;<br>cattle-system         cattle-cluster-agent-975dccfbc-5plgf                   1/1     Running     0          20h   10.42.0.253   rke-node   &lt;none&gt;           &lt;none&gt;<br>cattle-system         rancher-webhook-7dc6679459-mmdgc                       1/1     Running     0          20h   10.42.0.170   rke-node   &lt;none&gt;           &lt;none&gt;<br>cattle-system         system-upgrade-controller-78cfb99bb7-2gm2h             1/1     Running     0          20h   10.42.0.148   rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           cilium-26mkk                                           1/1     Running     0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           cilium-operator-86d6785dd8-pbmb4                       1/1     Running     0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           cloud-controller-manager-rke-node                      1/1     Running     0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           etcd-rke-node                                          1/1     Running     0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           helm-install-rke2-cilium-gjhtf                         0/1     Completed   0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           helm-install-rke2-coredns-cnn2k                        0/1     Completed   0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           helm-install-rke2-ingress-nginx-8q4w7                  0/1     Completed   0          20h   10.42.0.231   rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           helm-install-rke2-metrics-server-jrsnd                 0/1     Completed   0          20h   10.42.0.207   rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           helm-install-rke2-snapshot-controller-crd-bxf89        0/1     Completed   0          20h   10.42.0.96    rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           helm-install-rke2-snapshot-controller-n8m8v            0/1     Completed   1          20h   10.42.0.110   rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           helm-install-rke2-snapshot-validation-webhook-mqzlb    0/1     Completed   0          20h   10.42.0.64    rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           kube-apiserver-rke-node                                1/1     Running     0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           kube-controller-manager-rke-node                       1/1     Running     0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           kube-proxy-rke-node                                    1/1     Running     0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           kube-scheduler-rke-node                                1/1     Running     0          20h   10.0.0.5      rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           rke2-coredns-rke2-coredns-94745d-cqr2g                 1/1     Running     0          20h   10.42.0.175   rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           rke2-coredns-rke2-coredns-autoscaler-d8587b89c-5v8q5   1/1     Running     0          20h   10.42.0.194   rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           rke2-ingress-nginx-controller-xgkgs                    1/1     Running     0          20h   10.42.0.69    rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           rke2-metrics-server-5c9768ff67-jsj58                   1/1     Running     0          20h   10.42.0.206   rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           rke2-snapshot-controller-7d6476d7cb-cbzzc              1/1     Running     0          20h   10.42.0.199   rke-node   &lt;none&gt;           &lt;none&gt;<br>kube-system           rke2-snapshot-validation-webhook-5649fbd66c-f9fdl      1/1     Running     0          20h   10.42.0.112   rke-node   &lt;none&gt;           &lt;none&gt;</pre><h4>Validating the Cilium version</h4><ul><li>Using the Cilium CLI we can validate the Cilium version that has been installed.</li></ul><pre>cilium status<br>    /¯¯\<br> /¯¯\__/¯¯\    Cilium:             OK<br> \__/¯¯\__/    Operator:           OK<br> /¯¯\__/¯¯\    Envoy DaemonSet:    disabled (using embedded mode)<br> \__/¯¯\__/    Hubble Relay:       disabled<br>    \__/       ClusterMesh:        disabled<br><br>DaemonSet         cilium             Desired: 1, Ready: 1/1, Available: 1/1<br>Deployment        cilium-operator    Desired: 1, Ready: 1/1, Available: 1/1<br>Containers:       cilium             Running: 1<br>                  cilium-operator    Running: 1<br>Cluster Pods:     10/10 managed by Cilium<br>Image versions    cilium             rancher/mirrored-cilium-cilium:v1.15.1: 1<br>                  cilium-operator    rancher/mirrored-cilium-operator-generic:v1.15.1: 1</pre><p><strong><em>Note- </em></strong>Taking a closer look at the image repositories (rancher/mirrored-cilium-*) indicates that they have been packaged by the Rancher team and hence validates that the correct Cilium version has been installed.</p><h4>Cluster and Cilium Health Check</h4><ul><li>Let’s check the health of the nodes</li></ul><pre>kubectl get nodes -A -o wide<br><br>NAME       STATUS   ROLES                              AGE   VERSION           INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION      CONTAINER-RUNTIME<br>rke-node   Ready    control-plane,etcd,master,worker   22h   v1.27.11+rke2r1   10.0.0.5      &lt;none&gt;        Ubuntu 20.04.6 LTS   5.15.0-1053-azure   containerd://1.7.11-k3s2</pre><ul><li>Let’s also check the node-to-node health with cilium-health status</li></ul><pre>kubectl exec -ti ds/cilium -n kube-system -- cilium-health status<br><br>Defaulted container &quot;cilium-agent&quot; out of: cilium-agent, install-portmap-cni-plugin (init), config (init), mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), clean-cilium-state (init), install-cni-binaries (init)<br>Probe time:   2024-03-11T10:24:03Z<br>Nodes:<br>  rke-node (localhost):<br>    Host connectivity to 10.0.0.5:<br>      ICMP to stack:   OK, RTT=139.702µs<br>      HTTP to agent:   OK, RTT=253.903µs<br>    Endpoint connectivity to 10.42.0.213:<br>      ICMP to stack:   OK, RTT=115.201µs<br>      HTTP to agent:   OK, RTT=235.003µs</pre><h4>Validate the installation</h4><p>Let’s run a cilium connectivity test (an automated test that checks that Cilium has been deployed correctly and tests intra-node connectivity, inter-node connectivity and network policies) to verify that everything is working as expected.</p><pre>root@rkenode:~# cilium connectivity test<br>ℹ️  Single-node environment detected, enabling single-node connectivity test<br>ℹ️  Monitor aggregation detected, will skip some flow validation steps<br>✨ [rke-node] Creating namespace cilium-test for connectivity check...<br>✨ [rke-node] Deploying echo-same-node service...<br>✨ [rke-node] Deploying DNS test server configmap...<br>✨ [rke-node] Deploying same-node deployment...<br>✨ [rke-node] Deploying client deployment...<br>✨ [rke-tme] Deploying client2 deployment...<br>⌛ [rke-node] Waiting for deployments [client client2 echo-same-node] to become ready...<br>⌛ [rke-node] Waiting for CiliumEndpoint for pod cilium-test/client-6f6788d7cc-fshpx to appear...<br>⌛ [rke-node] Waiting for CiliumEndpoint for pod cilium-test/client2-bc59f56d5-dszgk to appear...<br>⌛ [rke-node] Waiting for pod cilium-test/client-6f6788d7cc-fshpx to reach DNS server on cilium-test/echo-same-node-58f99d79f4-w7psc pod...<br>⌛ [rke-node] Waiting for pod cilium-test/client2-bc59f56d5-dszgk to reach DNS server on cilium-test/echo-same-node-58f99d79f4-w7psc pod...<br>⌛ [rke-node] Waiting for pod cilium-test/client-6f6788d7cc-fshpx to reach default/kubernetes service...<br>⌛ [rke-node] Waiting for pod cilium-test/client2-bc59f56d5-dszgk to reach default/kubernetes service...<br>⌛ [rke-node] Waiting for CiliumEndpoint for pod cilium-test/echo-same-node-58f99d79f4-w7psc to appear...<br>⌛ [rke-node] Waiting for Service cilium-test/echo-same-node to become ready...<br>⌛ [rke-node] Waiting for NodePort 10.0.0.4:32312 (cilium-test/echo-same-node) to become ready...<br>ℹ️  Skipping IPCache check<br>🔭 Enabling Hubble telescope...<br>⚠️  Unable to contact Hubble Relay, disabling Hubble telescope and flow validation: rpc error: code = Unavailable desc = connection error: desc = &quot;transport: Error while dialing: dial tcp 127.0.0.1:4245: connect: connection refused&quot;<br>ℹ️  Expose Relay locally with:<br>   cilium hubble enable<br>   cilium hubble port-forward&amp;<br>ℹ️  Cilium version: 1.14.2<br>🏃 Running tests...<br>[=] Test [no-policies]<br>....................<br>[=] Test [no-policies-extra]<br>..<br>[=] Test [allow-all-except-world]<br>........<br>[=] Test [client-ingress]<br>..<br>[=] Test [client-ingress-knp]<br>..<br>[=] Test [allow-all-with-metrics-check]<br>..<br>[=] Test [all-ingress-deny]<br>......<br>[=] Test [all-ingress-deny-knp]<br>......<br>[=] Test [all-egress-deny]<br>........<br>[=] Test [all-egress-deny-knp]<br>........<br>[=] Test [all-entities-deny]<br>......<br>[=] Test [cluster-entity]<br>..<br>[=] Test [host-entity]<br>..<br>[=] Test [echo-ingress]<br>..<br>[=] Test [echo-ingress-knp]<br>..<br>[=] Test [client-ingress-icmp]<br>..<br>[=] Test [client-egress]<br>..<br>[=] Test [client-egress-knp]<br>..<br>[=] Test [client-egress-expression]<br>..<br>[=] Test [client-egress-expression-knp]<br>..<br>[=] Test [client-with-service-account-egress-to-echo]<br>..<br>[=] Test [client-egress-to-echo-service-account]<br>..<br>[=] Test [to-entities-world]<br>......<br>[=] Test [to-cidr-external]<br>....<br>[=] Test [to-cidr-external-knp]<br>....<br>[=] Test [echo-ingress-from-other-client-deny]<br>....<br>[=] Test [client-ingress-from-other-client-icmp-deny]<br>....<br>[=] Test [client-egress-to-echo-deny]<br>....<br>[=] Test [client-ingress-to-echo-named-port-deny]<br>..<br>[=] Test [client-egress-to-echo-expression-deny]<br>..<br>[=] Test [client-with-service-account-egress-to-echo-deny]<br>..<br>[=] Test [client-egress-to-echo-service-account-deny]<br>.<br>[=] Test [client-egress-to-cidr-deny]<br>....<br>[=] Test [client-egress-to-cidr-deny-default]<br>....<br>[=] Test [health]<br>.<br><br>[=] Skipping Test [north-south-loadbalancing]<br><br>[=] Skipping Test [pod-to-pod-encryption]<br><br>[=] Skipping Test [node-to-node-encryption]<br><br>[=] Skipping Test [egress-gateway-excluded-cidrs]<br><br>[=] Skipping Test [north-south-loadbalancing-with-l7-policy]<br>[=] Test [echo-ingress-l7]<br>......<br>[=] Test [echo-ingress-l7-named-port]<br>......<br>[=] Test [client-egress-l7-method]<br>......<br>[=] Test [client-egress-l7]<br>........<br>[=] Test [client-egress-l7-named-port]<br>........<br><br>[=] Skipping Test [client-egress-l7-tls-deny-without-headers]<br><br>[=] Skipping Test [client-egress-l7-tls-headers]<br><br>[=] Skipping Test [client-egress-l7-set-header]<br><br>[=] Skipping Test [echo-ingress-auth-always-fail]<br><br>[=] Skipping Test [echo-ingress-mutual-auth-spiffe]<br><br>[=] Skipping Test [pod-to-ingress-service]<br><br>[=] Skipping Test [pod-to-ingress-service-deny-all]<br><br>[=] Skipping Test [pod-to-ingress-service-allow-ingress-identity]<br>[=] Test [dns-only]<br>........<br>[=] Test [to-fqdns]<br>........<br><br>✅ All 42 tests (184 actions) successful, 13 tests skipped, 0 scenarios skipped.</pre><h3>References</h3><ul><li><a href="https://ranchermanager.docs.rancher.com/getting-started/overview">Rancher overview</a></li></ul><h3>Troubleshooting</h3><p>In case the resource group that you are creating the rancher server doesn’t have the requisiste permissions you will see this error:</p><pre>╷<br>│ Error: [ERROR] Timeout trying to login with admin user: invalid character &#39;p&#39; after top-level value<br>│<br>│   with module.rancher_common.rancher2_bootstrap.admin,<br>│   on ../rancher-common/rancher.tf line 4, in resource &quot;rancher2_bootstrap&quot; &quot;admin&quot;:<br>│    4: resource &quot;rancher2_bootstrap&quot; &quot;admin&quot; {<br>│<br>╵</pre><h3>Try out Cilium</h3><ul><li><a href="https://isovalent.com/resource-library/labs/">Try out Cilium</a> and get a first-hand experience of how it solves some real problems and use-cases in your cloud-native or on-prem environments related to Networking, Security or Observability.</li></ul><h3>🌟Conclusion 🌟</h3><p>Hopefully, this post gave you a good overview of how to deploy a Rancher server on Azure (using Terraform) in a single-node K3s Kubernetes cluster, with a single-node downstream Kubernetes cluster attached. You can then create a new cluster and run Cilium as the default CNI on it.</p><p>Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4c0b8dadf4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cilium: Evaluating workload identities on an AKS cluster running Azure CNI powered by Cilium]]></title>
            <link>https://medium.com/@amitmavgupta/cilium-evaluating-workload-identities-on-an-aks-cluster-running-azure-cni-powered-by-cilium-14b0d3ab65a1?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/14b0d3ab65a1</guid>
            <category><![CDATA[cilium]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[pod-identity]]></category>
            <category><![CDATA[ebpf]]></category>
            <category><![CDATA[azure-kubernetes-service]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Wed, 14 Feb 2024 10:33:28 GMT</pubDate>
            <atom:updated>2024-02-14T15:05:26.078Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cilium: Evaluating pod identities on an AKS cluster running Azure CNI powered by Cilium</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*QTUPZXzGC4zdD5N8Itp2nw.png" /><figcaption>Source: learn.microsoft.com</figcaption></figure><h3>☸ ️Introduction</h3><p>Workloads deployed on an Azure Kubernetes Services (AKS) cluster require Microsoft Entra application credentials or managed identities to access Microsoft Entra protected resources, such as Azure Key Vault.</p><h3>🎯Goals &amp; Objectives</h3><p>In this article, you will learn how to deploy an AKS cluster running Azure CNI powered by Cilium and configured it to use a workload identity in preparation for application workloads to authenticate with that credential.</p><h3>How does Workload Identity work?</h3><p>Microsoft Entra Workload ID integrates with the capabilities native to Kubernetes to federate with external identity providers. <a href="https://learn.microsoft.com/en-us/azure/active-directory/develop/workload-identities-overview">Microsoft Entra Workload ID</a> uses <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#serviceaccount-token-volume-projection">Service Account Token Volume Projection</a> enabling pods to use a Kubernetes identity (that is, a service account). A Kubernetes token is issued and <a href="https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens">OIDC federation</a> enables Kubernetes applications to access Azure resources securely with Microsoft Entra ID based on annotated service accounts.</p><h3>Pre-Requisites</h3><ul><li>You should have an <a href="https://aka.ms/freeazure">Azure Subscription</a>.</li><li>Install <a href="https://kubernetes.io/releases/download/#kubectl">kubectl</a>.</li><li>Install <a href="https://helm.sh/docs/intro/install/">Helm</a>.</li><li>Install the aks-preview Azure CLI extension<br>- The aks-preview Azure CLI extension version 0.5.123 or later.</li></ul><pre>az extension add --name aks-preview<br>The installed extension &#39;aks-preview&#39; is in preview.</pre><pre>az extension update --name aks-preview<br>Latest version of &#39;aks-preview&#39; is already installed.<br>Use --debug for more information</pre><ul><li>The identity you’re using to create your cluster has the appropriate minimum permissions. For more information about access and identity for AKS, see <a href="https://learn.microsoft.com/en-us/azure/aks/concepts-identity">Access and identity options for Azure Kubernetes Service (AKS)</a>.</li><li>Ensure you have enough <a href="https://learn.microsoft.com/en-us/azure/aks/quotas-skus-regions">quota resources</a> to create an AKS cluster. Go to the Subscription blade, navigate to “Usage + Quotas”, and make sure you have enough quota for the following resources:<br>-Regional vCPUs<br>-Standard Dv4 Family vCPUs</li></ul><h3>Let’s get going</h3><h4>Create a keyvault</h4><ul><li>Azure Key Vault is a cloud service that provides a secure store for keys, secrets, and certificates.</li><li>Create a Resource Group</li></ul><pre>az group create --name aksidentity --location eastus</pre><ul><li>Use the Azure CLI az keyvault create command to create a Key Vault in the resource group from the previous step.</li></ul><pre>az keyvault create --name &quot;&lt;your-unique-keyvault-name&gt;&quot; --resource-group aksidentity --location eastus</pre><ul><li>Provide the necessary permissions to the Key Vault. <br>- Login to the Azure Portal.<br>- Search for Key Vault and select the configured key vault.<br>- Click &gt; Settings &gt; Access configuration</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9REx7omGXjp3JqOygo5OHw.png" /></figure><h4>Create an AKS cluster running Azure CNI powered by Cilium</h4><ul><li>Create an AKS cluster with Azure CNI powered by Cilium in overlay mode.</li></ul><pre>az aks create -n aksidentity -g aksidentity -l eastus \<br>  --network-plugin azure \<br>  --network-plugin-mode overlay \<br>  --pod-cidr 192.168.0.0/16 \<br>  --network-dataplane cilium<br><br>az aks get-credentials --resource-group aksidentity --name aksidentity</pre><p><strong><em>Note- </em></strong><em>Ideally, the AKS cluster should have been created with the field — enable-workload-identity but that is not available during the AKS cluster creation and hence we have to update the AKS cluster.</em></p><h4>Export environment variables</h4><ul><li>To help simplify steps to configure the identities required, the steps below define environment variables for reference on the cluster.</li></ul><pre>RG_NAME=aksidentity<br>LOCATION=eastus<br>CLUSTER_NAME=aksidentity<br>KEYVAULT_SECRET_NAME=mysecret<br>SUBSCRIPTION_ID=$(az account show --query id -o tsv)<br>KEYVAULT_NAME=$(az keyvault list -g ${RG_NAME} --query &quot;[0].name&quot; -o tsv)</pre><h4>Enable workload identity on the AKS cluster</h4><ul><li>Enable workload identity on the newly created AKS cluster.</li></ul><pre>az aks update --resource-group $RG_NAME --name $CLUSTER_NAME --enable-oidc-issuer --enable-workload-identity</pre><h4>Retrieve the OIDC issuer URL</h4><p>To get the OIDC Issuer URL and save it to an environmental variable, run the following command. Replace the default value for the arguments -n, which is the name of the cluster:</p><pre>export AKS_OIDC_ISSUER=&quot;$(az aks show -n $CLUSTER_NAME -g $RG_NAME --query &quot;oidcIssuerProfile.issuerUrl&quot; -otsv)&quot;<br>echo $AKS_OIDC_ISSUER</pre><h4>Mutating webhook</h4><p>Verify that you now see a mutating webhook pod on your cluster. The mutating admission webhook projects a signed service account token to a workload’s volume and injects environment variables to pods.</p><pre>kubectl get pods -n kube-system | grep webhook<br>azure-wi-webhook-controller-manager-69b4897c88-6slm2   1/1     Running   0          95m<br>azure-wi-webhook-controller-manager-69b4897c88-z2lc7   1/1     Running   0          95m</pre><h4>Create a managed identity and grant access to Keyvault</h4><p>Use the Azure CLI az account set command to set a specific subscription to be the current active subscription. Then use the az identity create command to create a managed identity.</p><pre>export USER_ASSIGNED_IDENTITY_NAME=&quot;workload-identity&quot;<br>az identity create --name &quot;${USER_ASSIGNED_IDENTITY_NAME}&quot; --resource-group &quot;${RG_NAME}&quot; --location &quot;${LOCATION}&quot; --subscription &quot;${SUBSCRIPTION_ID}&quot;</pre><p><strong><em>Note- </em></strong><em>Currently, there seems to be an issue with assigning policies to the keyvault from the CLI and hence use the UI. These can be either user or SPN-based.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h5nUedAspxg8wOpAUNfnyA.png" /></figure><h4>Create a Service Account</h4><p>Create a Kubernetes service account and annotate it with the client ID of the managed identity created in the previous step.</p><pre>export SERVICE_ACCOUNT_NAME=&quot;workload-identity-sa&quot;<br>export SERVICE_ACCOUNT_NAMESPACE=&quot;default&quot;<br><br>cat &lt;&lt;EOF | kubectl apply -f -<br>apiVersion: v1<br>kind: ServiceAccount<br>metadata:<br>  annotations:<br>    azure.workload.identity/client-id: &quot;${USER_ASSIGNED_CLIENT_ID}&quot;<br>  labels:<br>    azure.workload.identity/use: &quot;true&quot;<br>  name: &quot;${SERVICE_ACCOUNT_NAME}&quot;<br>  namespace: &quot;${SERVICE_ACCOUNT_NAMESPACE}&quot;<br>EOF</pre><h4>Establish a Federated Identity</h4><p>The namespace and service account name are used to create the subject identifier in the federation. Once this is setup, this Managed Identity will now trust tokens coming from our Kubernetes cluster. The subject claim identifies the principal that will be the subject of the token.</p><pre>az identity federated-credential create --name myfederatedIdentity --identity-name &quot;${USER_ASSIGNED_IDENTITY_NAME}&quot; --resource-group &quot;${RG_NAME}&quot; --issuer &quot;${AKS_OIDC_ISSUER}&quot; --subject system:serviceaccount:&quot;${SERVICE_ACCOUNT_NAMESPACE}&quot;:&quot;${SERVICE_ACCOUNT_NAME}&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h5nUedAspxg8wOpAUNfnyA.png" /></figure><h4>Deploy Sample workload &amp; Test</h4><p>The following YAML deploys a sample .net application that writes to the log the content of the secret inside keyvault. The .NET application expects two environment variables for the Kevault URL and the Keyvault secret name references.</p><p>Note the following required annotations on the K8S YAML configuration:</p><ul><li>azure.workload.identity/use: “true”</li><li>serviceAccountName: ${SERVICE_ACCOUNT_NAME}</li><li>Apply the yaml file</li></ul><pre>export KEYVAULT_URL=&quot;$(az keyvault show -g ${RG_NAME} -n ${KEYVAULT_NAME} --query properties.vaultUri -o tsv)&quot;<br><br>cat &lt;&lt;EOF | kubectl apply -f -<br>apiVersion: v1<br>kind: Pod<br>metadata:<br>  name: quick-start<br>  namespace: ${SERVICE_ACCOUNT_NAMESPACE}<br>  labels:<br>    azure.workload.identity/client-id: CLIENT_ID<br>    azure.workload.identity/tenant-id: TENANT_ID<br>    azure.workload.identity/use: &quot;true&quot;<br>spec:<br>  serviceAccountName: ${SERVICE_ACCOUNT_NAME}<br>  containers:<br>    - image: ghcr.io/azure/azure-workload-identity/msal-net<br>      name: oidc<br>      env:<br>      - name: KEYVAULT_URL<br>        value: ${KEYVAULT_URL}<br>      - name: SECRET_NAME<br>        value: ${KEYVAULT_SECRET_NAME}<br>EOF</pre><ul><li>Observe that the pod is up and running</li></ul><pre>kubectl get pods -A -o wide                                                                                                                    Amits-MacBook-Air.local: Thu Jan 11 18:06:46 2024<br><br>NAMESPACE     NAME                                                   READY   STATUS    RESTARTS   AGE    IP              NODE                                NOMINATED NODE   READINESS GATES<br>default       quick-start                                            1/1     Running   0          61m    192.168.0.232   aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   azure-cns-275pp                                        1/1     Running   0          114m   10.224.0.4      aks-nodepool1-50194707-vmss000000   &lt;none&gt;           &lt;none&gt;<br>kube-system   azure-cns-644gq                                        1/1     Running   0          114m   10.224.0.5      aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;<br>kube-system   azure-cns-v7kkj                                        1/1     Running   0          114m   10.224.0.6      aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   azure-ip-masq-agent-7nhpx                              1/1     Running   0          114m   10.224.0.6      aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   azure-ip-masq-agent-gtvhb                              1/1     Running   0          114m   10.224.0.4      aks-nodepool1-50194707-vmss000000   &lt;none&gt;           &lt;none&gt;<br>kube-system   azure-ip-masq-agent-tjmpg                              1/1     Running   0          114m   10.224.0.5      aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;<br>kube-system   azure-wi-webhook-controller-manager-69b4897c88-6slm2   1/1     Running   0          106m   192.168.0.162   aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   azure-wi-webhook-controller-manager-69b4897c88-z2lc7   1/1     Running   0          106m   192.168.2.208   aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-gdwbf                                           1/1     Running   0          113m   10.224.0.5      aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-khn4m                                           1/1     Running   0          113m   10.224.0.4      aks-nodepool1-50194707-vmss000000   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-fb4c58f8d-5xvxt                        1/1     Running   0          113m   10.224.0.4      aks-nodepool1-50194707-vmss000000   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-operator-fb4c58f8d-bsc4s                        1/1     Running   0          113m   10.224.0.5      aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;<br>kube-system   cilium-vghnd                                           1/1     Running   0          113m   10.224.0.6      aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   cloud-node-manager-bfnxr                               1/1     Running   0          114m   10.224.0.6      aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   cloud-node-manager-f2988                               1/1     Running   0          114m   10.224.0.4      aks-nodepool1-50194707-vmss000000   &lt;none&gt;           &lt;none&gt;<br>kube-system   cloud-node-manager-qc4cw                               1/1     Running   0          114m   10.224.0.5      aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-789789675-c2w7c                                1/1     Running   0          114m   192.168.0.104   aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-789789675-r79pf                                1/1     Running   0          111m   192.168.1.191   aks-nodepool1-50194707-vmss000000   &lt;none&gt;           &lt;none&gt;<br>kube-system   coredns-autoscaler-649b947bbd-5ljt7                    1/1     Running   0          114m   192.168.0.200   aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   csi-azuredisk-node-6kjbh                               3/3     Running   0          114m   10.224.0.6      aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   csi-azuredisk-node-pq9bc                               3/3     Running   0          114m   10.224.0.4      aks-nodepool1-50194707-vmss000000   &lt;none&gt;           &lt;none&gt;<br>kube-system   csi-azuredisk-node-q4sgw                               3/3     Running   0          114m   10.224.0.5      aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;<br>kube-system   csi-azurefile-node-bjzv7                               3/3     Running   0          114m   10.224.0.6      aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   csi-azurefile-node-bzvtv                               3/3     Running   0          114m   10.224.0.4      aks-nodepool1-50194707-vmss000000   &lt;none&gt;           &lt;none&gt;<br>kube-system   csi-azurefile-node-hqzc9                               3/3     Running   0          114m   10.224.0.5      aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;<br>kube-system   konnectivity-agent-64c4b5f57b-4fd7d                    1/1     Running   0          107m   192.168.0.166   aks-nodepool1-50194707-vmss000002   &lt;none&gt;           &lt;none&gt;<br>kube-system   konnectivity-agent-64c4b5f57b-zhjf8                    1/1     Running   0          107m   192.168.2.86    aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;<br>kube-system   metrics-server-5467676b76-8mkcc                        2/2     Running   0          111m   192.168.1.10    aks-nodepool1-50194707-vmss000000   &lt;none&gt;           &lt;none&gt;<br>kube-system   metrics-server-5467676b76-xthmb                        2/2     Running   0          111m   192.168.2.24    aks-nodepool1-50194707-vmss000001   &lt;none&gt;           &lt;none&gt;</pre><ul><li>Once the pod is running, ensure the pod is showing the KeyVault secret. If the pod communication to the KeyVault was successful, you will see the following message:</li></ul><pre>kubectl logs quick-start<br><br>START 01/11/2024 11:35:35 (quick-start)<br>Your secret is AKS Secret\!</pre><ul><li>You can also inspect the additional environment variables and volumeMounts created:</li></ul><pre>Environment:<br>      KEYVAULT_URL:                https://aksidentity.vault.azure.net/<br>      SECRET_NAME:                 ########<br>      AZURE_CLIENT_ID:             ####################################<br>      AZURE_TENANT_ID:             ####################################<br>      AZURE_FEDERATED_TOKEN_FILE:  /var/run/secrets/azure/tokens/azure-identity-token<br>      AZURE_AUTHORITY_HOST:        https://login.microsoftonline.com/<br>    Mounts:<br>      /var/run/secrets/azure/tokens from azure-identity-token (ro)<br>      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-dx6dr (ro)</pre><h4>Accessing Azure Resources from the test pod</h4><ul><li>Install <a href="https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt">Azure CLI</a> on the test pod</li><li>Fetch the federation token from the pod</li></ul><pre>kubectl exec quick-start - cat /var/run/secrets/azure/tokens/azure-identity-token</pre><ul><li>Using the federated token, log in to Azure CLI from the test pod.</li></ul><pre>az login --federated-token “$(cat $AZURE_FEDERATED_TOKEN_FILE)” --debug</pre><ul><li>You should not be prompted for a password as the token will be used for authentication.</li><li>Once the login goes through you can execute all AKS and az related commands.</li></ul><pre>az aks list -o table<br>Name              Location          ResourceGroup      KubernetesVersion    CurrentKubernetesVersion    ProvisioningState    Fqdn<br>----------------  ----------------  -----------------  -------------------  --------------------------  -------------------  -------------------------------------------------------------------------------------------------------<br><br>devsecops-aks     eastus            rg-aks-gha         1.27                 1.27.7                      Succeeded            ###############################################################<br>prvaks            westeurope        prvaksvnet         1.27                 1.27.7                      Succeeded            ########################################################################################<br><br>az group list -o table<br>Name                                                  Location          Status<br>----------------------------------------------------  ----------------  ---------<br>NetworkWatcherRG                                      eastus            Succeeded<br>quickstart-rancher-quickstart                         westus3           Succeeded<br>AzureArc                                              eastus            Succeeded<br>rg-aks-gha                                            eastus            Succeeded<br>MC_rg-aks-gha_devsecops-aks_eastus                    eastus            Succeeded<br>kubeadm                                               southindia        Succeeded<br>prvaks                                                westeurope        Succeeded<br>prvaksvnet                                            westeurope        Succeeded<br>MC_prvaksvnet_prvaks_westeurope                       westeurope        Succeeded</pre><h3>References</h3><ul><li><a href="https://isovalent.com/blog/post/tutorial-azure-cni-powered-by-cilium/">Azure CNI powered by Cilium</a></li><li><a href="https://docs.cilium.io/en/v1.13/#getting-started">Getting started with Cilium</a></li><li><a href="https://learn.microsoft.com/en-us/azure/aks/workload-identity-deploy-cluster">Workload Identity on AKS</a></li></ul><h3>Try out Cilium</h3><ul><li><a href="https://isovalent.com/resource-library/labs/">Try out Cilium</a> and get a first-hand experience of how it solves some real problems and use-cases in your cloud-native or on-prem environments related to Networking, Security or Observability.</li></ul><h3>🌟Conclusion 🌟</h3><p>Hopefully, this post gave you a good idea of how to deploy an AKS cluster running Azure CNI powered by Cilium and configured it to use a workload identity in preparation for application workloads to authenticate with that credential. Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14b0d3ab65a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS: Accessing an EC2 instance in a Private Subnet using Endpoints]]></title>
            <link>https://awstip.com/aws-accessing-an-ec2-instance-in-a-private-subnet-using-endpoints-787891e6e788?source=rss-a806cc5ade28------2</link>
            <guid isPermaLink="false">https://medium.com/p/787891e6e788</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[private-subnet]]></category>
            <category><![CDATA[endpoints]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Amit Gupta]]></dc:creator>
            <pubDate>Thu, 08 Feb 2024 08:18:57 GMT</pubDate>
            <atom:updated>2025-07-21T15:03:49.059Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS: Accessing an EC2 Instance in a Private Subnet using Endpoints</h3><h3>☸ ️Introduction</h3><p>There are only two ways to access an EC2 instance in a private subnet in AWS. One is by using serial console but that requires the EC2 instance to be a Nitro based instance.</p><p>Let’s explore another mechanism called as Endpoints to access an EC2 instance created in a private subnet.</p><h3>🎯Goals &amp; Objectives</h3><p>In this article you will learn how to access a private EC2 instance using endpoints.</p><h3>Let’s get going</h3><ul><li>Create a VPC with a private subnet.</li><li>Create an EC2 instance with an AMI image from AWS in the private subnet.<br>- The reason to chose an AMI image (Amazon Linux 2023) from AWS is for password-less access into the EC2 instance.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*oF67YqFl_8LlqtUCJf9eug.png" /></figure><ul><li>Once the instance is up and running, you can see that it has only private IP addresses and a private DNS name.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KMvKQU_U3RxrWPQJTmR9QA.png" /></figure><ul><li>Connect to the instance- You will be prompted with 4 options.<br>- <strong><em>EC2 serial console</em></strong>- this is available for Nitro based instances.<br>- <strong><em>Session Manager or SSM<br>- SSH client- </em></strong>using the regular SSH key pair method of logging in to EC2 instances.<br><em>- </em><strong><em>EC2 instance connect</em></strong>- In this mode as well you will be presented with two options.</li><li>Let’s talk more about EC2 instance connect which is available in two options:<br>- <strong><em>Connect using EC2 Instance- </em></strong>Connect using the EC2 Instance Connect browser-based client, with a public IPv4 address. Since our goal is to access a private EC2 instance we will not use this approach.<br>- <strong><em>Connect using EC2 Instance Connect Endpoint- </em></strong>Connect using the EC2 Instance Connect browser-based client, with a private IPv4 address and a VPC endpoint.</li><li>Let’s go ahead and configure an EC2 Instance Connect Endpoint to access our private VM.<br>- Click EC2 Instance Connect Endpoint and it will walk you through a workflow to create an EC2 endpoint.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*X33qbC9Ut__pkuDdpZu10Q.png" /></figure><ul><li>Provide a name to the EC2 endpoint.</li><li>Select Service Category as EC2 Instance Connect Endpoint.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hwthi0NklaX7vBeEX2e0CA.png" /></figure><ul><li>Select the VPC and also the Security Group in which the EC2 instance has been created.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*mBJdhnCyaw4Qd0hY_YdvnQ.png" /></figure><ul><li>Select the respective subnet and click “Create Endpoint”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B3lHnzB_QT51uvzpgdF4Aw.png" /></figure><ul><li>Once the endpoint is created and the status is “Available” you can use it to connect to the VM.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PaLCIrUprohK7M4CRvDTsQ.png" /></figure><ul><li>You can now choose the EC2 endpoint and connect to the private EC2 instance and click “Connect”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*Ch_4KXA4d2gZzP2BdRyTVw.png" /></figure><ul><li>You should be able to now access the VM from your preferred browser with password less access.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JwlBgdjUtneG9UcMQ0A6dA.png" /></figure><h3>🌟Conclusion 🌟</h3><p>Hopefully, this post gave you a good overview of how to access an EC2 instance in a Private Subnet using Endpoints. Thank you for Reading !! 🙌🏻😁📃, see you in the next blog.</p><p>🚀 Feel free to connect/follow with me/on :</p><p><strong>LinkedIn</strong>: <a href="https://www.linkedin.com/in/agamitgupta">linkedin.com/in/agamitgupta</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=787891e6e788" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/aws-accessing-an-ec2-instance-in-a-private-subnet-using-endpoints-787891e6e788">AWS: Accessing an EC2 instance in a Private Subnet using Endpoints</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>