github.com/cilium/cilium@v1.16.2/Documentation/installation/k3s.rst (about) 1 .. only:: not (epub or latex or html) 2 3 WARNING: You are looking at unreleased Cilium documentation. 4 Please use the official rendered version released here: 5 https://docs.cilium.io 6 7 .. _k3s_install: 8 9 ********************** 10 Installation Using K3s 11 ********************** 12 13 This guide walks you through installation of Cilium on `K3s <https://k3s.io/>`_, 14 a highly available, certified Kubernetes distribution designed for production 15 workloads in unattended, resource-constrained, remote locations or inside IoT 16 appliances. 17 18 Cilium is presently supported on amd64 and arm64 architectures. 19 20 Install a Master Node 21 ===================== 22 23 The first step is to install a K3s master node making sure to disable support 24 for the default CNI plugin and the built-in network policy enforcer: 25 26 .. note:: 27 28 If running Cilium in :ref:`kubeproxy-free` mode, add option ``--disable-kube-proxy`` 29 30 .. code-block:: shell-session 31 32 curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC='--flannel-backend=none --disable-network-policy' sh - 33 34 Install Agent Nodes (Optional) 35 ============================== 36 37 K3s can run in standalone mode or as a cluster making it a great choice for 38 local testing with multi-node data paths. Agent nodes are joined to the master 39 node using a node-token which can be found on the master node at 40 ``/var/lib/rancher/k3s/server/node-token``. 41 42 Install K3s on agent nodes and join them to the master node making sure to 43 replace the variables with values from your environment: 44 45 .. code-block:: shell-session 46 47 curl -sfL https://get.k3s.io | K3S_URL='https://${MASTER_IP}:6443' K3S_TOKEN=${NODE_TOKEN} sh - 48 49 Should you encounter any issues during the installation, please refer to the 50 :ref:`troubleshooting_k8s` section and/or seek help on `Cilium Slack`_. 51 52 Please consult the Kubernetes :ref:`k8s_requirements` for information on how 53 you need to configure your Kubernetes cluster to operate with Cilium. 54 55 Configure Cluster Access 56 ======================== 57 58 For the Cilium CLI to access the cluster in successive steps you will need to 59 use the ``kubeconfig`` file stored at ``/etc/rancher/k3s/k3s.yaml`` by setting 60 the ``KUBECONFIG`` environment variable: 61 62 .. code-block:: shell-session 63 64 export KUBECONFIG=/etc/rancher/k3s/k3s.yaml 65 66 Install Cilium 67 ============== 68 69 .. include:: cli-download.rst 70 71 .. note:: 72 73 Install Cilium with ``--set=ipam.operator.clusterPoolIPv4PodCIDRList="10.42.0.0/16"`` to match k3s default podCIDR 10.42.0.0/16. 74 75 .. note:: 76 If you are using Rancher Desktop, you may need to override the cni path by adding the additional flag ``--set 'cni.binPath=/usr/libexec/cni'`` 77 78 Install Cilium by running: 79 80 .. parsed-literal:: 81 82 cilium install |CHART_VERSION| --set=ipam.operator.clusterPoolIPv4PodCIDRList="10.42.0.0/16" 83 84 Validate the Installation 85 ========================= 86 87 .. include:: cli-status.rst 88 .. include:: cli-connectivity-test.rst 89 90 .. include:: next-steps.rst 91