<commit_before>.. only:: not (epub or latex or html)

    WARNING: You are looking at unreleased Cilium documentation.
    Please use the official rendered version released here:
    https://docs.cilium.io

.. _k8s_install_quick:
.. _k8s_quick_install:
.. _k8s_install_standard:

******************
Quick Installation
******************

This guide will walk you through the quick default installation. It will
automatically detect and use the best configuration possible for the Kubernetes
distribution you are using. All state is stored using Kubernetes CRDs.

This is the best installation method for most use cases.  For large
environments (> 500 nodes) or if you want to run specific datapath modes, refer
to the :ref:`k8s_install_advanced` guide.

Should you encounter any issues during the installation, please refer to the
:ref:`troubleshooting_k8s` section and / or seek help on the `Slack channel`.

Install the Cilium CLI
======================

.. include:: install-cli.rst

Create the Cluster
===================

If you don't have a Kubernetes Cluster yet, you can use the instructions below
to create a Kubernetes cluster locally or using a managed Kubernetes service:

.. tabs::

    .. group-tab:: GKE

       The following command creates a Kubernetes cluster using `Google
       Kubernetes Engine <https://cloud.google.com/kubernetes-engine>`_.  See
       `Installing Google Cloud SDK <https://cloud.google.com/sdk/install>`_
       for instructions on how to install ``gcloud`` and prepare your
       account.

       .. code-block:: shell-session

           export NAME="$(whoami)-$RANDOM"
           gcloud container clusters create "${NAME}" --zone us-west2-a 
           gcloud container clusters get-credentials "${NAME}" --zone us-west2-a

    .. group-tab:: AKS

       The following command creates a Kubernetes cluster using `Azure
       Kubernetes Service <https://docs.microsoft.com/en-us/azure/aks/>`_. See
       `Azure Cloud CLI
       <https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest>`_
       for instructions on how to install ``az`` and prepare your account.

       .. code-block:: shell-session

           export NAME="$(whoami)-$RANDOM"
           export AZURE_RESOURCE_GROUP="aks-cilium-group"
           az group create --name "${AZURE_RESOURCE_GROUP}" -l westus2
           az aks create --resource-group "${AZURE_RESOURCE_GROUP}" --name "${NAME}" --network-plugin azure
           az aks get-credentials --name "${NAME}" --resource-group "${AZURE_RESOURCE_GROUP}"

       .. attention::

           Do NOT specify the ``--network-policy`` flag when creating the
           cluster, as this will cause the Azure CNI plugin to install unwanted
           iptables rules.

    .. group-tab:: EKS

       The following command creates a Kubernetes cluster with ``eksctl``
       using `Amazon Elastic Kubernetes Service
       <https://aws.amazon.com/eks/>`_.  See `eksctl Installation
       <https://github.com/weaveworks/eksctl>`_ for instructions on how to
       install ``eksctl`` and prepare your account.

       .. code-block:: shell-session

           export NAME="$(whoami)-$RANDOM"
           eksctl create cluster --name "${NAME}" --region eu-west-1 --without-nodegroup

    .. group-tab:: kind

       Install ``kind`` >= v0.7.0 per kind documentation:
       `Installation and Usage <https://kind.sigs.k8s.io/#installation-and-usage>`_

       .. parsed-literal::

          curl -LO \ |SCM_WEB|\/Documentation/gettingstarted/kind-config.yaml
          kind create cluster --config=kind-config.yaml

    .. group-tab:: minikube

       Install minikube >= v1.5.2 as per minikube documentation: 
       `Install Minikube <https://kubernetes.io/docs/tasks/tools/install-minikube/>`_.

       .. code-block:: shell-session

          minikube start --network-plugin=cni

Install Cilium
==============

You can install Cilium on any Kubernetes cluster. If you already have a
Kubernetes cluster, skip this step. If you want to create a cluster, pick one
of the options below:

.. tabs::

    .. group-tab:: Generic

       These are the generic instructions on how to install Cilium into any
       Kubernetes cluster. The installer will attempt to automatically pick the
       best configuration options for you. Please see the other tabs for
       distribution/platform specific instructions which also list the ideal
       default configuration for particular platforms.

       .. include:: requirements-generic.rst

       **Install Cilium**

       Install Cilium into the Kubernetes cluster pointed to by your current kubectl context:
<commit_msg>Swapped sentences on instructions<commit_after>.. only:: not (epub or latex or html)

    WARNING: You are looking at unreleased Cilium documentation.
    Please use the official rendered version released here:
    https://docs.cilium.io

.. _k8s_install_quick:
.. _k8s_quick_install:
.. _k8s_install_standard:

******************
Quick Installation
******************

This guide will walk you through the quick default installation. It will
automatically detect and use the best configuration possible for the Kubernetes
distribution you are using. All state is stored using Kubernetes CRDs.

This is the best installation method for most use cases.  For large
environments (> 500 nodes) or if you want to run specific datapath modes, refer
to the :ref:`k8s_install_advanced` guide.

Should you encounter any issues during the installation, please refer to the
:ref:`troubleshooting_k8s` section and / or seek help on the `Slack channel`.

Install the Cilium CLI
======================

.. include:: install-cli.rst

Create the Cluster
===================

If you don't have a Kubernetes Cluster yet, you can use the instructions below
to create a Kubernetes cluster locally or using a managed Kubernetes service:

.. tabs::

    .. group-tab:: GKE

       The following command creates a Kubernetes cluster using `Google
       Kubernetes Engine <https://cloud.google.com/kubernetes-engine>`_.  See
       `Installing Google Cloud SDK <https://cloud.google.com/sdk/install>`_
       for instructions on how to install ``gcloud`` and prepare your
       account.

       .. code-block:: shell-session

           export NAME="$(whoami)-$RANDOM"
           gcloud container clusters create "${NAME}" --zone us-west2-a 
           gcloud container clusters get-credentials "${NAME}" --zone us-west2-a

    .. group-tab:: AKS

       The following command creates a Kubernetes cluster using `Azure
       Kubernetes Service <https://docs.microsoft.com/en-us/azure/aks/>`_. See
       `Azure Cloud CLI
       <https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest>`_
       for instructions on how to install ``az`` and prepare your account.

       .. code-block:: shell-session

           export NAME="$(whoami)-$RANDOM"
           export AZURE_RESOURCE_GROUP="aks-cilium-group"
           az group create --name "${AZURE_RESOURCE_GROUP}" -l westus2
           az aks create --resource-group "${AZURE_RESOURCE_GROUP}" --name "${NAME}" --network-plugin azure
           az aks get-credentials --name "${NAME}" --resource-group "${AZURE_RESOURCE_GROUP}"

       .. attention::

           Do NOT specify the ``--network-policy`` flag when creating the
           cluster, as this will cause the Azure CNI plugin to install unwanted
           iptables rules.

    .. group-tab:: EKS

       The following command creates a Kubernetes cluster with ``eksctl``
       using `Amazon Elastic Kubernetes Service
       <https://aws.amazon.com/eks/>`_.  See `eksctl Installation
       <https://github.com/weaveworks/eksctl>`_ for instructions on how to
       install ``eksctl`` and prepare your account.

       .. code-block:: shell-session

           export NAME="$(whoami)-$RANDOM"
           eksctl create cluster --name "${NAME}" --region eu-west-1 --without-nodegroup

    .. group-tab:: kind

       Install ``kind`` >= v0.7.0 per kind documentation:
       `Installation and Usage <https://kind.sigs.k8s.io/#installation-and-usage>`_

       .. parsed-literal::

          curl -LO \ |SCM_WEB|\/Documentation/gettingstarted/kind-config.yaml
          kind create cluster --config=kind-config.yaml

    .. group-tab:: minikube

       Install minikube >= v1.5.2 as per minikube documentation: 
       `Install Minikube <https://kubernetes.io/docs/tasks/tools/install-minikube/>`_.

       .. code-block:: shell-session

          minikube start --network-plugin=cni

Install Cilium
==============

You can install Cilium on any Kubernetes cluster. Pick one of the options below:

.. tabs::

    .. group-tab:: Generic

       These are the generic instructions on how to install Cilium into any
       Kubernetes cluster. The installer will attempt to automatically pick the
       best configuration options for you. Please see the other tabs for
       distribution/platform specific instructions which also list the ideal
       default configuration for particular platforms.

       .. include:: requirements-generic.rst

       **Install Cilium**

       Install Cilium into the Kubernetes cluster pointed to by your current kubectl context:

{'fraction_non_alphanumeric': 0.11084624553039332, 'fraction_numerical': 0.0041174558457037595, 'mean_word_length': 2.9110169491525424, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5039153', 'n_tokens_mistral': 2548, 'n_tokens_neox': 2367, 'n_words': 912}