{"id":15649337,"url":"https://github.com/garutilorenzo/ansible-role-linux-kubernetes","last_synced_at":"2026-03-04T20:03:44.161Z","repository":{"id":154321507,"uuid":"475815338","full_name":"garutilorenzo/ansible-role-linux-kubernetes","owner":"garutilorenzo","description":"Install and configure a high available Kubernetes cluster with Ansible","archived":false,"fork":false,"pushed_at":"2025-01-10T10:08:09.000Z","size":96,"stargazers_count":43,"open_issues_count":1,"forks_count":30,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-20T11:06:55.401Z","etag":null,"topics":["ansible","ansible-galaxy","ansible-playbook","ansible-role","automation","high-availability","k8s","k8s-cluster","kubernetes","kubernetes-cluster","kubernetes-setup"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/garutilorenzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-30T09:47:52.000Z","updated_at":"2025-04-12T12:11:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"96dd418d-aad6-44c5-bba4-fe3fd725078c","html_url":"https://github.com/garutilorenzo/ansible-role-linux-kubernetes","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/garutilorenzo/ansible-role-linux-kubernetes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garutilorenzo%2Fansible-role-linux-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garutilorenzo%2Fansible-role-linux-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garutilorenzo%2Fansible-role-linux-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garutilorenzo%2Fansible-role-linux-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/garutilorenzo","download_url":"https://codeload.github.com/garutilorenzo/ansible-role-linux-kubernetes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/garutilorenzo%2Fansible-role-linux-kubernetes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30091580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T19:41:02.502Z","status":"ssl_error","status_checked_at":"2026-03-04T19:40:05.550Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-galaxy","ansible-playbook","ansible-role","automation","high-availability","k8s","k8s-cluster","kubernetes","kubernetes-cluster","kubernetes-setup"],"created_at":"2024-10-03T12:29:18.901Z","updated_at":"2026-03-04T20:03:44.141Z","avatar_url":"https://github.com/garutilorenzo.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub issues](https://img.shields.io/github/issues/garutilorenzo/ansible-role-linux-kubernetes)](https://github.com/garutilorenzo/ansible-role-linux-kubernetes/issues)\n![GitHub](https://img.shields.io/github/license/garutilorenzo/ansible-role-linux-kubernetes)\n[![GitHub forks](https://img.shields.io/github/forks/garutilorenzo/ansible-role-linux-kubernetes)](https://github.com/garutilorenzo/ansible-role-linux-kubernetes/network)\n[![GitHub stars](https://img.shields.io/github/stars/garutilorenzo/ansible-role-linux-kubernetes)](https://github.com/garutilorenzo/ansible-role-linux-kubernetes/stargazers)\n\n# Install and configure a high available Kubernetes cluster\n\nThis ansible role will install and configure a high available Kubernetes cluster. This repo automate the installation process of Kubernetes using [kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/).\n\nThis repo is only a example on how to use Ansible automation to install and configure a Kubernetes cluster. For a production environment use [Kubespray](https://kubespray.io)\n\n## Supported OS\n\nThis role was tested with:\n\nUbuntu: 22.04, 24.04\n\nFedora: 40\n\nTested partially  with RHEL 8.\n\n## Requirements\n\nInstall ansible, ipaddr and netaddr:\n\n```\npip install -r requirements.txt\n```\n\nDownload the role form GitHub:\n\n```\nansible-galaxy install git+https://github.com/garutilorenzo/ansible-role-linux-kubernetes.git\n```\n\n## Role Variables\n\nThis role accept this variables:\n\n| Var  |  Default | Desc |\n| ------- | ----------- |  ----------- |\n| `disable_firewall`       | If set to yes Ansible will disable the firewall.   |\n| `disable_selinux`        | `yes`       | If set to yes Ansible will disable Selinux on RedHat based distro. Default `yes` [Ref.](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/)  |\n| `kubernetes_version`       | `1.31.4`       | Kubernetes version to install  |\n| `kubernetes_image_registry`       | `registry.k8s.io`       | Default k8s registry  |\n| `kubernetes_pause_image`       | `registry.k8s.io/pause:3.10`       | Default `pause` image version (includes registry).  Needed to solve [this](https://github.com/kubernetes/kubeadm/issues/3146) issue. |\n| `kubernetes_cri`       | `containerd`       | Kubernetes [CRI](https://kubernetes.io/docs/concepts/architecture/cri/) to install.   |\n| `kubernetes_cni`       | `flannel`       | Kubernetes [CNI](https://github.com/containernetworking/cni) to install.  |\n| `flannel_version`       | `v0.26.2`       | Required if  `kubernetes_cni` is set to `flannel`. Documentation available [here](https://github.com/flannel-io/flannel) |\n| `kubernetes_dns_domain`       | `cluster.local`       | Kubernetes default DNS domain  |\n| `kubernetes_pod_subnet`       | `10.244.0.0/16`       | Kubernetes pod subnet  |\n| `kubernetes_service_subnet`       | `10.96.0.0/12`       | Kubernetes service subnet  |\n| `kubernetes_api_port`       | `6443`       | kubeapi listen port  |\n| `kubernetes_subnet`       |  `192.168.25.0/24` | Subnet where Kubernetess will be deployed. If the VM or bare metal server has more than one interface, Ansible will filter the interface used by Kubernetes based on the interface subnet |\n| `setup_vip`       | Setup kubernetes VIP addres using [kube-vip](https://kube-vip.io/)   |\n| `kubernetes_vip_ip`       | `192.168.25.225`       | **Required** if setup_vip is set to *yes*. Vip ip address for the control plane  |\n| `kubevip_version`       | `v0.8.7`       | kube-vip container version  |\n| `install_longhorn`       | Install [Longhorn](#longhorn), Cloud native distributed block storage for Kubernetes.  |\n| `longhorn_version`       | `v1.7.2`       | Longhorn release.  |\n| `install_nginx_ingress`       | Install [nginx ingress controller](#nginx-ingress-controller)  |\n| `nginx_ingress_controller_version`       | `v1.12.0`       | nginx ingress controller version  |\n| `nginx_ingress_controller_http_nodeport`       | `30080`       | NodePort used by nginx ingress controller for the incoming http traffic  |\n| `nginx_ingress_controller_https_nodeport`       | `30443`       |  NodePort used by nginx ingress controller for the incoming https traffic  |\n| `enable_nginx_ingress_proxy_protocol`       | Enable  nginx ingress controller proxy protocol mode |\n| `enable_nginx_real_ip`       | Enable nginx ingress controller real-ip module |\n| `nginx_ingress_real_ip_cidr`       | `0.0.0.0/0`       | **Required** if enable_nginx_real_ip is set to *yes* Trusted subnet to use with the real-ip module  |\n| `nginx_ingress_proxy_body_size`       | `20m`       | nginx ingress controller max proxy body size  |\n| `sans_base`       | `[list of values, see defaults/main.yml]`       | list of ip addresses or FQDN uset to sign the kube-api certificate  |\n\n## Extra Variables\n\nThis role accept an extra variable *kubernetes_init_host*. This variable is used when the cluster is bootstrapped for the first time. The value of this variable must be the hostname of one of the master nodes. When ansible will run on the matched host kubernetes will be initialized.\n\n## Cluster resource deployed\n\nWhit this role [Nginx ingress controller](#nginx-ingress-controller) and [Longhorn](#longhorn) will be installed.\n\n### Nginx ingress controller\n\n[Nginx ingress controller](https://kubernetes.github.io/ingress-nginx/) is used as ingress controller.\n\nThe installation is the [bare metal](https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal-clusters) installation, the ingress controller then is exposed via a NodePort Service.\nYou can customize the ports exposed by the NodePort service, use [Role Variables](#role-variables) to change this values.\n\n### Longhorn\n\n[Longhorn](https://longhorn.io) is a lightweight, reliable, and powerful distributed block storage system for Kubernetes.\n\nLonghorn implements distributed block storage using containers and microservices. Longhorn creates a dedicated storage controller for each block device volume and synchronously replicates the volume across multiple replicas stored on multiple nodes. The storage controller and replicas are themselves orchestrated using Kubernetes.\n\n## Vagrant\n\nTo test this role you can use [Vagrant](https://www.vagrantup.com/) and [Virtualbox](https://www.virtualbox.org/) to bring up a example infrastructure. Once you have downloaded this repo use Vagrant to start the virtual machines:\n\n```\nvagrant up\n```\n\nIn the Vagrantfile you can inject your public ssh key directly in the authorized_keys of the vagrant user. You have to change the *CHANGE_ME* placeholder in the Vagrantfile. You can also adjust the number of the vm deployed by changing the NNODES variable (Default: 6)\n\n## Using this role\n\nTo use this role you follow the example in the [examples/](examples/) dir. \nOn the very first run add the extra variable parameter `-e kubernetes_init_host=\u003cHOSTNAME\u003e` to the `ansible-playbook` command where HOSTNAME is the hostname where the k8s cluster will be initialized.\n\nAdjust the example hosts.ini file with your hosts and run the playbook:\n\n```\nlorenzo@mint-virtual:~$ ansible-playbook -i hosts-ubuntu.ini site.yml -e kubernetes_init_host=k8s-ubuntu-0\n\nPLAY [kubemaster] ***************************************************************************************************************************************************\n\nTASK [Gathering Facts] **********************************************************************************************************************************************\nok: [k8s-ubuntu-2]\nok: [k8s-ubuntu-1]\nok: [k8s-ubuntu-0]\n\nTASK [ansible-role-kubernetes : include_tasks] **********************************************************************************************************************\nincluded: /home/lorenzo/workspaces-local/ansible-role-kubernetes/tasks/setup_repo_Debian.yml for k8s-ubuntu-0, k8s-ubuntu-1, k8s-ubuntu-2 =\u003e (item=/home/lorenzo/workspaces-local/ansible-role-kubernetes/tasks/setup_repo_Debian.yml)\n\nTASK [ansible-role-kubernetes : Install required system packages] ***************************************************************************************************\nok: [k8s-ubuntu-2]\nok: [k8s-ubuntu-1]\nok: [k8s-ubuntu-0]\n\nTASK [ansible-role-kubernetes : Add Google GPG apt Key] *************************************************************************************************************\nok: [k8s-ubuntu-0]\nok: [k8s-ubuntu-1]\nok: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : Add K8s Repository] *****************************************************************************************************************\nok: [k8s-ubuntu-1]\nok: [k8s-ubuntu-2]\nok: [k8s-ubuntu-0]\n\nTASK [ansible-role-kubernetes : Add Docker GPG apt Key] *************************************************************************************************************\nok: [k8s-ubuntu-1]\nok: [k8s-ubuntu-0]\nok: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : shell] ******************************************************************************************************************************\nchanged: [k8s-ubuntu-1]\nchanged: [k8s-ubuntu-2]\nchanged: [k8s-ubuntu-0]\n\nTASK [ansible-role-kubernetes : Add Docker Repository] **************************************************************************************************************\nok: [k8s-ubuntu-0]\nok: [k8s-ubuntu-1]\nok: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : setup] ******************************************************************************************************************************\nok: [k8s-ubuntu-1]\nok: [k8s-ubuntu-0]\nok: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : include_tasks] **********************************************************************************************************************\nincluded: /home/lorenzo/workspaces-local/ansible-role-kubernetes/tasks/preflight.yml for k8s-ubuntu-0, k8s-ubuntu-1, k8s-ubuntu-2\n\nTASK [ansible-role-kubernetes : disable ufw] ************************************************************************************************************************\nok: [k8s-ubuntu-2]\nok: [k8s-ubuntu-0]\nok: [k8s-ubuntu-1]\n\nTASK [ansible-role-kubernetes : Install iptables-legacy] ************************************************************************************************************\nskipping: [k8s-ubuntu-0]\nskipping: [k8s-ubuntu-1]\nskipping: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : Remove zram-generator-defaults] *****************************************************************************************************\nskipping: [k8s-ubuntu-0]\nskipping: [k8s-ubuntu-1]\nskipping: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : disable firewalld] ******************************************************************************************************************\nskipping: [k8s-ubuntu-0]\nskipping: [k8s-ubuntu-1]\nskipping: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : Put SELinux in permissive mode, logging actions that would be blocked.] *************************************************************\nskipping: [k8s-ubuntu-0]\nskipping: [k8s-ubuntu-1]\nskipping: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : Disable SELinux] ********************************************************************************************************************\nskipping: [k8s-ubuntu-0]\nskipping: [k8s-ubuntu-1]\nskipping: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : Install openssl] ********************************************************************************************************************\nok: [k8s-ubuntu-2]\nok: [k8s-ubuntu-1]\nok: [k8s-ubuntu-0]\n\nTASK [ansible-role-kubernetes : load overlay kernel module] *********************************************************************************************************\nchanged: [k8s-ubuntu-1]\nchanged: [k8s-ubuntu-0]\nchanged: [k8s-ubuntu-2]\n\nTASK [ansible-role-kubernetes : load br_netfilter kernel module] ****************************************************************************************************\nchanged: [k8s-ubuntu-1]\nchanged: [k8s-ubuntu-0]\nchanged: [k8s-ubuntu-2]\n\n[...]\n[...]\n[...]\n\nTASK [ansible-role-kubernetes : Add KUBELET_ROOT_DIR env var] *******************************************************************************************************\nskipping: [k8s-ubuntu-3]\n\nTASK [ansible-role-kubernetes : Add KUBELET_ROOT_DIR env var, set value] ********************************************************************************************\nskipping: [k8s-ubuntu-3]\n\nTASK [ansible-role-kubernetes : Install longhorn] *******************************************************************************************************************\nskipping: [k8s-ubuntu-3]\n\nTASK [ansible-role-kubernetes : Install longhorn storageclass] ******************************************************************************************************\nskipping: [k8s-ubuntu-3]\n\nTASK [ansible-role-kubernetes : include_tasks] **********************************************************************************************************************\nincluded: /home/lorenzo/workspaces-local/ansible-role-kubernetes/tasks/install_nginx_ingress.yml for k8s-ubuntu-3, k8s-ubuntu-4, k8s-ubuntu-5\n\nTASK [ansible-role-kubernetes : Check if ingress-nginx is installed] ************************************************************************************************\nchanged: [k8s-ubuntu-3 -\u003e k8s-ubuntu-0(192.168.25.110)]\n\nTASK [ansible-role-kubernetes : Install ingress-nginx] **************************************************************************************************************\nskipping: [k8s-ubuntu-3]\n\nTASK [ansible-role-kubernetes : render nginx_ingress_config.yml] ****************************************************************************************************\nskipping: [k8s-ubuntu-3]\n\nTASK [ansible-role-kubernetes : Apply nginx ingress config] *********************************************************************************************************\nskipping: [k8s-ubuntu-3]\n\nPLAY RECAP **********************************************************************************************************************************************************\nk8s-ubuntu-0               : ok=78   changed=24   unreachable=0    failed=0    skipped=25   rescued=0    ignored=3   \nk8s-ubuntu-1               : ok=52   changed=12   unreachable=0    failed=0    skipped=30   rescued=0    ignored=1   \nk8s-ubuntu-2               : ok=52   changed=12   unreachable=0    failed=0    skipped=30   rescued=0    ignored=1\nk8s-ubuntu-3               : ok=58   changed=30   unreachable=0    failed=0    skipped=35   rescued=0    ignored=1   \nk8s-ubuntu-4               : ok=52   changed=28   unreachable=0    failed=0    skipped=27   rescued=0    ignored=1   \nk8s-ubuntu-5               : ok=52   changed=28   unreachable=0    failed=0    skipped=27   rescued=0    ignored=1   \n```\n\nNow we have a Kubernetes cluster deployed in high available mode, we can check the status of the cluster:\n\n```\nroot@k8s-ubuntu-0:~# kubectl get nodes\nNAME           STATUS   ROLES           AGE    VERSION\nk8s-ubuntu-0   Ready    control-plane   139m   v1.24.3\nk8s-ubuntu-1   Ready    control-plane   136m   v1.24.3\nk8s-ubuntu-2   Ready    control-plane   136m   v1.24.3\nk8s-ubuntu-3   Ready    \u003cnone\u003e          117m   v1.24.3\nk8s-ubuntu-4   Ready    \u003cnone\u003e          117m   v1.24.3\nk8s-ubuntu-5   Ready    \u003cnone\u003e          117m   v1.24.3\n```\n\nCheck the pods status:\n\n```\nroot@k8s-ubuntu-0:~# kubectl get pods --all-namespaces\nNAMESPACE         NAME                                           READY   STATUS      RESTARTS       AGE\ningress-nginx     ingress-nginx-admission-create-tsc8p           0/1     Completed   0              135m\ningress-nginx     ingress-nginx-admission-patch-48tpn            0/1     Completed   0              135m\ningress-nginx     ingress-nginx-controller-6dc865cd86-kfq88      1/1     Running     0              135m\nkube-flannel      kube-flannel-ds-fm4s6                          1/1     Running     0              117m\nkube-flannel      kube-flannel-ds-hhvxx                          1/1     Running     0              117m\nkube-flannel      kube-flannel-ds-ngdtc                          1/1     Running     0              117m\nkube-flannel      kube-flannel-ds-q5ncb                          1/1     Running     0              136m\nkube-flannel      kube-flannel-ds-vq4kk                          1/1     Running     0              139m\nkube-flannel      kube-flannel-ds-zshpf                          1/1     Running     0              137m\nkube-system       coredns-6d4b75cb6d-8dh9h                       1/1     Running     0              139m\nkube-system       coredns-6d4b75cb6d-xq98k                       1/1     Running     0              139m\nkube-system       etcd-k8s-ubuntu-0                              1/1     Running     0              139m\nkube-system       etcd-k8s-ubuntu-1                              1/1     Running     0              136m\nkube-system       etcd-k8s-ubuntu-2                              1/1     Running     0              136m\nkube-system       kube-apiserver-k8s-ubuntu-0                    1/1     Running     0              139m\nkube-system       kube-apiserver-k8s-ubuntu-1                    1/1     Running     0              135m\nkube-system       kube-apiserver-k8s-ubuntu-2                    1/1     Running     0              136m\nkube-system       kube-controller-manager-k8s-ubuntu-0           1/1     Running     0              139m\nkube-system       kube-controller-manager-k8s-ubuntu-1           1/1     Running     0              136m\nkube-system       kube-controller-manager-k8s-ubuntu-2           1/1     Running     0              135m\nkube-system       kube-proxy-59jqx                               1/1     Running     0              136m\nkube-system       kube-proxy-8mjwr                               1/1     Running     0              139m\nkube-system       kube-proxy-8nhbw                               1/1     Running     0              117m\nkube-system       kube-proxy-j2rrx                               1/1     Running     0              117m\nkube-system       kube-proxy-qwd5r                               1/1     Running     0              117m\nkube-system       kube-proxy-vcs7g                               1/1     Running     0              137m\nkube-system       kube-scheduler-k8s-ubuntu-0                    1/1     Running     0              139m\nkube-system       kube-scheduler-k8s-ubuntu-1                    1/1     Running     0              136m\nkube-system       kube-scheduler-k8s-ubuntu-2                    1/1     Running     0              135m\nkube-system       kube-vip-k8s-ubuntu-0                          1/1     Running     1 (136m ago)   139m\nkube-system       kube-vip-k8s-ubuntu-1                          1/1     Running     0              136m\nkube-system       kube-vip-k8s-ubuntu-2                          1/1     Running     0              136m\nlonghorn-system   csi-attacher-dcb85d774-jrggr                   1/1     Running     0              114m\nlonghorn-system   csi-attacher-dcb85d774-slhqt                   1/1     Running     0              114m\nlonghorn-system   csi-attacher-dcb85d774-xcbxn                   1/1     Running     0              114m\nlonghorn-system   csi-provisioner-5d8dd96b57-74x6h               1/1     Running     0              114m\nlonghorn-system   csi-provisioner-5d8dd96b57-kdzdf               1/1     Running     0              114m\nlonghorn-system   csi-provisioner-5d8dd96b57-xmpjf               1/1     Running     0              114m\nlonghorn-system   csi-resizer-7c5bb5fd65-4262v                   1/1     Running     0              114m\nlonghorn-system   csi-resizer-7c5bb5fd65-mfjgv                   1/1     Running     0              114m\nlonghorn-system   csi-resizer-7c5bb5fd65-qw944                   1/1     Running     0              114m\nlonghorn-system   csi-snapshotter-5586bc7c79-bs2xn               1/1     Running     0              114m\nlonghorn-system   csi-snapshotter-5586bc7c79-d927b               1/1     Running     0              114m\nlonghorn-system   csi-snapshotter-5586bc7c79-v99t6               1/1     Running     0              114m\nlonghorn-system   engine-image-ei-766a591b-hrs6g                 1/1     Running     0              114m\nlonghorn-system   engine-image-ei-766a591b-n9fsn                 1/1     Running     0              114m\nlonghorn-system   engine-image-ei-766a591b-vxhbb                 1/1     Running     0              114m\nlonghorn-system   instance-manager-e-3dba6914                    1/1     Running     0              114m\nlonghorn-system   instance-manager-e-7bd8b1ff                    1/1     Running     0              114m\nlonghorn-system   instance-manager-e-aca0fdc4                    1/1     Running     0              114m\nlonghorn-system   instance-manager-r-244c040c                    1/1     Running     0              114m\nlonghorn-system   instance-manager-r-39bd81b1                    1/1     Running     0              114m\nlonghorn-system   instance-manager-r-3b7f12b1                    1/1     Running     0              114m\nlonghorn-system   longhorn-admission-webhook-858d86b96b-j5rcv    1/1     Running     0              135m\nlonghorn-system   longhorn-admission-webhook-858d86b96b-lphkq    1/1     Running     0              135m\nlonghorn-system   longhorn-conversion-webhook-576b5c45c7-4p55x   1/1     Running     0              135m\nlonghorn-system   longhorn-conversion-webhook-576b5c45c7-lq686   1/1     Running     0              135m\nlonghorn-system   longhorn-csi-plugin-f7zmn                      2/2     Running     0              114m\nlonghorn-system   longhorn-csi-plugin-hs58p                      2/2     Running     0              114m\nlonghorn-system   longhorn-csi-plugin-wfpfs                      2/2     Running     0              114m\nlonghorn-system   longhorn-driver-deployer-96cf98c98-7hzft       1/1     Running     0              135m\nlonghorn-system   longhorn-manager-92xws                         1/1     Running     0              116m\nlonghorn-system   longhorn-manager-b6knm                         1/1     Running     0              116m\nlonghorn-system   longhorn-manager-tg2zc                         1/1     Running     0              116m\nlonghorn-system   longhorn-ui-86b56b95c8-ctbvf                   1/1     Running     0              135m\n```\n\nwe can see, longhorn, nginx ingress and all the kube-system pods.\n\nWe can also inspect the service of the nginx ingress controller:\n\n```\nroot@k8s-ubuntu-0:~# kubectl get svc -n ingress-nginx\nNAME                                    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE\ningress-nginx-controller                NodePort    10.111.203.177   \u003cnone\u003e        80:30080/TCP,443:30443/TCP   136m\ningress-nginx-controller-admission      ClusterIP   10.105.11.11     \u003cnone\u003e        443/TCP                      136m\n```\n\nwe can see the nginx ingress controller listening port, in this case the http port is 30080 and  the https port is 30443. From an external machine we can test the ingress controller:\n\n```\nlorenzo@mint-virtual:~$ curl -v http://192.168.25.110:30080\n*   Trying 192.168.25.110:30080...\n* TCP_NODELAY set\n* Connected to 192.168.25.110 (192.168.25.110) port 30080 (#0)\n\u003e GET / HTTP/1.1\n\u003e Host: 192.168.25.110:30080\n\u003e User-Agent: curl/7.68.0\n\u003e Accept: */*\n\u003e \n* Mark bundle as not supporting multiuse\n\u003c HTTP/1.1 404 Not Found\n\u003c Date: Wed, 17 Aug 2022 12:26:17 GMT\n\u003c Content-Type: text/html\n\u003c Content-Length: 146\n\u003c Connection: keep-alive\n\u003c \n\u003chtml\u003e\n\u003chead\u003e\u003ctitle\u003e404 Not Found\u003c/title\u003e\u003c/head\u003e\n\u003cbody\u003e\n\u003ccenter\u003e\u003ch1\u003e404 Not Found\u003c/h1\u003e\u003c/center\u003e\n\u003chr\u003e\u003ccenter\u003enginx\u003c/center\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n* Connection #0 to host 192.168.25.110 left intact\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarutilorenzo%2Fansible-role-linux-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarutilorenzo%2Fansible-role-linux-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarutilorenzo%2Fansible-role-linux-kubernetes/lists"}