Tips and tricks to help you master the Cilium CLI when it comes to installing Cilium, the leading Kubernetes networking CNI into your platform Introduction Let's go through some basic steps of using the Cilium CLI to install Cilium into our Kubernetes cluster. I'm actually using the Isovalent Hands-On Labs, which are free. You can see here we're using the Getting Started lab, and you can go to isovalent.com/labs to get started with that. First and foremost, let's have a quick look at the CLI tool itself. It's already installed on my machine. We're going to look at cilium install -h for help, and you'll see that there's a number of flags available. A couple of my favorite things to do here are to run a dry run. We can do a dry run with Helm values as well, and that tells us what's going to happen inside our environment if we run cilium install before we actually do so. That's really useful for testing. We're also going to have a quick look at the list versions command, so we can go off and find the latest versions of Cilium that are available and decide which one we want to install in our environment. Configure the Cilium CLI values We also have the set command, and this mirrors installing with Helm. We have something called Helm mode now in the Cilium CLI that essentially allows you to use one or the other to configure your environment, and you can switch easily between the two as well. You'll also see in some of our labs that we've got a wait command as well, which allows us to wait and not move on from the terminal window until that installation is finished. So let's get started. The easiest way to do this is to run cilium install. That will connect to our cluster, figure out what version of Kubernetes it is, install the version of Cilium that aligns with the CLI release at that moment in time, and use the default autogenerated settings for your environment. It will detect whether it's kind, AWS, GCP, or a bare metal cluster, and basically use a generated set of default values for that as well. I'm not going to run that quite yet, because I also want to show you some of the additional commands. As part of this, we can use the set command the same way that we would with Helm. We can do things like setting the IPAM mode to Kubernetes or requiring an IPv4 pod CIDR, so we can build that up very similarly. You may also have a values file, so we can do the --values argument and specify the location of our own values file as well. Again, it's very similar to Helm from that point of view. Let's also look at the ability to see the different versions available. If I run cilium install --list-versions, this is going to show us all of the different versions that are available to install in our environment, including release candidates. Sometimes the maintainers of Cilium release snapshots with certain features that have been added, and that lets us test those inside our environments from the CLI. Let's try this with a particular Cilium version. We do cilium install, set the version, and use the 1.15.0 release. I'm also going to set ipam.mode=kubernetes. We can see now it's detecting our Kubernetes environment. It tells us what version of Cilium it is going to install, it autodetects kube-proxy as well, and that's now installed inside our environment. We even have the ability to uninstall Cilium, so I can just run cilium uninstall and that deletes anything that's been installed inside our environment as well. You may still have a couple of additional operations in your platform to clean up artifacts that are left over once you've removed the CNI. One of the last areas I wanted to focus on here was being able to use a CI image. If you're looking at Cilium in the GitHub repo, you'll notice that we have a lot of pull requests, a lot of new features being added, and sometimes fixes get backported to major versions as well. How do we test that if you can't move to 1.15 just to get a particular fix, but it has been backported to 1.14 and you want to test it before that release is available? Here I've opened up one of those backporting PRs. If we go to the checks and scroll down the left-hand side, we should see something called Image CI Build. This is where it builds the available images for CI. If we look at the output of the display digests task, we can see all the different CI builds that are available that we can use inside our environment. For example, we can see the different Cilium agents that are being built, the API servers if we're using ClusterMesh, or key-value store mesh, and we can take each of those and use them. Install the Cilium CLI What does that look like going forward? We can use the Cilium installation to handle that for us. With cilium install, we can set a new image repository to the CI image that we've just seen and use a specific tag to pull that image. We can still combine that with multiple parameters and values, either using the set command or a values file as well. So that was a really quick run-through of using the Cilium CLI tool to install Cilium inside our environment. To learn more about both the Cilium CLI and the Cilium agent CLI, why not download our Cilium cheat sheet from isovalent.com? As you can see, it's very in-depth and has things like how to upgrade Cilium and how to configure Cilium ConfigMaps. Policy configuration If we move over to the right-hand side, then we start to use those commands inside the Cilium agent itself, so things like the BGP policy or looking at FQDN caches if we're using layer 7 proxies. There's lots of really great information in there, and hopefully it makes your life a lot easier when using the Cilium platform as well. So head on over to isovalent.com, or find the short link below. Thank you very much.