# K3S-K8S What are You Using It For?

**URL:** <https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706>\
**Category:** Homelab\
**Created:** [July 30, 2021, 9:22pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706 "2021-07-30T21:22:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 30, 2021, 9:22pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/1 "2021-07-30T21:22:02Z")

</div>

I’m just curious;

Kubernetes has a very high cool factor, and there is no shortage of things to learn. However, my practical side keeps asking the question, what workloads do I “need” Kubernetes for in a Homelab besides learning and testing?

So there’s the question. Aside from training and testing, what types of workloads are you using K3S/K8S for in your Homelab? Is it worth the expense both in terms of time and hardware?

What do you think?

---

<div class="post-metadata">

**Author:** ![dfarning](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/d/b782af/32.png) [@dfarning](https://community.learnlinux.tv/u/dfarning)\
**Post date:** [July 30, 2021, 10:11pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/2 "2021-07-30T22:11:15Z")

</div>

Awesome question,

As I was mowing the lawn this afternoon, I was doing the math: 3 RPIs + SD cards + power supply + … I think I have an old 5 port switch.

Nothing good can come from that line of thinking ☹

---

<div class="post-metadata">

**Author:** ![Buffy](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/buffy/32/497_2.png) [@Buffy](https://community.learnlinux.tv/u/Buffy)\
**Post date:** [July 31, 2021, 6:08am UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/3 "2021-07-31T06:08:11Z")

</div>

TBH, I don’t think it has a use in a homelab beyond learning. Of course, learning can be pretty important (and even fun), so that’s probably enough.

---

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 31, 2021, 6:27am UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/4 "2021-07-31T06:27:36Z")

</div>

I hadn’t watched @Jay’s Ansible series, and I’m about half way through it now. After, I’ll “attempt” an HA K3S cluster using a Load Balancer and Rancher. If that goes OK, may do some K8S / Microk8s or something. The only thing that won’t get merc’d on my cluster is TrueNAS.

I’ve already re-built the thing several times manually, and it’s getting tedious to say the least. The other thing I’m considering is creating my own Ubuntu [amd64] Mirror using ( [apt-mirror](http://manpages.ubuntu.com/manpages/bionic/man1/apt-mirror.1.html) ) for the main repositories. I have saved a partially updated VM as a template, but, I like starting from a fresh install all the way through to a running product; full stack provisioning basically.

That’s the idea I have, we’ll see if I can make it happen. There are many moving parts to that stack.

---

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 31, 2021, 8:52am UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/5 "2021-07-31T08:52:06Z")

</div>

Well, I ran into my first issue with the Ansible series. For whatever reason, after installing ansible via the Ubuntu repo’s, I was getting the following error

```bash
ModuleNotFoundError: No module named ‘ansible’

```

I use [Anaconda Python](https://www.anaconda.com/), [PyCharm](https://www.jetbrains.com/lp/pycharm-pro) or VSCode for both work and personal projects, so, i just created a new venv and went to town on it.

```bash
# Create the ( lltv ) virtual environment

conda create -n lltv python=3.8

# Activate ( lltv )

conda activate lltv

# Update pip

python -m pip install --upgrade pip

# Install Ansible

pip install ansible

```

After that, things went as expected.

```bash
(lltv) ki7mt@3950X:~/Dev/Ansible/ha-k3s-ansible (master)*$ ansible all -m ping
192.168.1.252 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "ping": "pong"
}
192.168.1.250 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "ping": "pong"
}
192.168.1.251 | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "ping": "pong"

```

I’m not sure what the problem with the Ubuntu package installation of Ansible is / was, but, I rarely use the system Python Interpreter just to avoid conflicts like this. The same for Java, Spark and a few others. For those I tend to use [Sdkman](https://sdkman.io/) as it makes swapping version very easy.

Anyway, back to @Jay’s Ansible series !

---

<div class="post-metadata">

**Author:** ![dfarning](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/d/b782af/32.png) [@dfarning](https://community.learnlinux.tv/u/dfarning)\
**Post date:** [July 31, 2021, 9:51am UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/6 "2021-07-31T09:51:47Z")

</div>

Were you using the standard ubuntu repo or did you add the ansible ppa? on pop os desktop 21.04 the standard repo worked.

> dave@p73:~/projects/infrastructure$ ansible --version  
> ansible 2.10.5  
> config file = /home/dave/projects/infrastructure/ansible.cfg  
> configured module search path = [‘/home/dave/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
> ansible python module location = /usr/lib/python3/dist-packages/ansible  
> executable location = /usr/bin/ansible  
> python version = 3.9.5 (default, May 11 2021, 08:20:37) [GCC 10.3.0]

It is a bit old, but it works.

When I tried to follow the instructions on the ansible site.

> $ sudo apt update  
> $ sudo apt install software-properties-common  
> $ sudo add-apt-repository --yes --update ppa:ansible/ansible  
> $ sudo apt install ansible

I got a similar error. I don’t think the ppa supports anything newer than ubuntu 18.04. It installs but doesn’t work.

---

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 31, 2021, 10:06am UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/7 "2021-07-31T10:06:35Z")

</div>

I was using the standard repos, and did not add the PPA.

Looks like the latest 2.x version only goes to 18.04, but Ansible-3 and Ansible-4 goes up to Groovy (20.10)

Pip installs the 2.x.x series for Python 3.8

```bash
ansible [core 2.11.3] 
  config file = /home/ki7mt/Dev/Ansible/ha-k3s-ansible/ansible.cfg
  configured module search path = ['/home/ki7mt/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ki7mt/anaconda3/envs/lltv/lib/python3.8/site-packages/ansible
  ansible collection location = /home/ki7mt/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/ki7mt/anaconda3/envs/lltv/bin/ansible
  python version = 3.8.10 (default, Jun 4 2021, 15:09:15) [GCC 7.5.0]
  jinja version = 3.0.1
  libyaml = True

```

Launchpad Reference: [Ansible Team](https://launchpad.net/~ansible)

```bash
# Ansible-3
sudo add-apt-repository ppa:ansible/ansible-3
sudo apt-get update

# Ansible-4
sudo add-apt-repository ppa:ansible/ansible-4
sudo apt-get update

```

---

<div class="post-metadata">

**Author:** ![dfarning](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/d/b782af/32.png) [@dfarning](https://community.learnlinux.tv/u/dfarning)\
**Post date:** [July 31, 2021, 10:28am UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/8 "2021-07-31T10:28:55Z")

</div>

I’ll give ansible-4 a try tomorrow.

---

<div class="post-metadata">

**Author:** ![Mr\_McBride](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/m/a698b9/32.png) [@Mr\_McBride](https://community.learnlinux.tv/u/Mr_McBride)\
**Post date:** [July 31, 2021, 12:31pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/9 "2021-07-31T12:31:47Z")

</div>

For me, first and foremost, learning.

Second, while I don’t require high availability, k3s (RPi) it is nice to have.

I’m not running any pods yet, but my list of apps to host in k3s:  
Unifi network controller  
pi-hole  
Grafana/InfluxDB  
ansible  
OpenVAS  
Nextcloud - maybe

For me, this the start to move from hosting VMs to hosting containers.

---

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 31, 2021, 6:07pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/10 "2021-07-31T18:07:39Z")

</div>

I’ve only run some simple things like Nginx and played around with scaling pods. I do have some radio projects that could benefit from pods though. Also, learning how to implement CI/CDpiplines.

A couple other things that could be beneficial in K3’s: HashiCorp [Vault and Consul in High availability](https://learn.hashicorp.com/tutorials/vault/ha-with-consul) mode for secrets management. Allthough, it’s probably not “needed” for home use, it’s definitely good to know.

This is from their site.

Concept

 ![ha-mode](https://community.learnlinux.tv/uploads/default/original/1X/6681019981c54f2138d821de03ee98ca0a30cd9d.png)

Design

 ![vault-consul](https://community.learnlinux.tv/uploads/default/original/1X/c678ca779c1eb884359b15f44a9d25293ce6257b.png)

---

<div class="post-metadata">

**Author:** ![Buffy](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/buffy/32/497_2.png) [@Buffy](https://community.learnlinux.tv/u/Buffy)\
**Post date:** [July 31, 2021, 6:26pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/11 "2021-07-31T18:26:48Z")

</div>

I think it’s a bit confusing how ansible reports its versioning. I have it installed with pip and it installs ansible-4.3.0 and also ansible\_core-2.11.3.

```auto
(venv-ansible) [astrocat@spiff:~/projects/serenity-ansible]
└─➤ $ pip install ansible
Collecting ansible
  Downloading ansible-4.3.0.tar.gz (35.1 MB)
     |████████████████████████████████| 35.1 MB 29.8 MB/s
Collecting ansible-core<2.12,>=2.11.3
  Downloading ansible-core-2.11.3.tar.gz (6.8 MB)
     |████████████████████████████████| 6.8 MB 28.9 MB/s
Collecting jinja2
  Downloading Jinja2-3.0.1-py3-none-any.whl (133 kB)
     |████████████████████████████████| 133 kB 6.0 MB/s
Collecting PyYAML
  Downloading PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl (630 kB)
     |████████████████████████████████| 630 kB 28.7 MB/s
Collecting cryptography
  Downloading cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl (3.2 MB)
     |████████████████████████████████| 3.2 MB 28.8 MB/s
Collecting packaging
  Downloading packaging-21.0-py3-none-any.whl (40 kB)
     |████████████████████████████████| 40 kB 3.1 MB/s
Collecting resolvelib<0.6.0,>=0.5.3
  Downloading resolvelib-0.5.4-py2.py3-none-any.whl (12 kB)
Collecting cffi>=1.12
  Downloading cffi-1.14.6-cp39-cp39-manylinux1_x86_64.whl (405 kB)
     |████████████████████████████████| 405 kB 27.1 MB/s
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |████████████████████████████████| 112 kB 4.4 MB/s
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl (30 kB)
Collecting pyparsing>=2.0.2
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Building wheels for collected packages: ansible, ansible-core
  Building wheel for ansible (setup.py) ... done
  Created wheel for ansible: filename=ansible-4.3.0-py3-none-any.whl size=57843255 sha256=e48973c5f010784506977587e73f6d1187b976f813b0fcae52afd5cbe55f0777
  Stored in directory: /home/astrocat/.cache/pip/wheels/f7/66/b6/f40ca8fb56c13f0e5998b42100a308732989b9b3fa00b8dfef
  Building wheel for ansible-core (setup.py) ... done
  Created wheel for ansible-core: filename=ansible_core-2.11.3-py3-none-any.whl size=1955103 sha256=6248d3aac5a5a8d73de02fb56ad27a4c015c9961d9408a37ef49a99b42a36823
  Stored in directory: /home/astrocat/.cache/pip/wheels/2f/4f/a4/fafba282bc097a86e814d508da21db6fd6f3cd41803d83a928
Successfully built ansible ansible-core
Installing collected packages: pycparser, pyparsing, MarkupSafe, cffi, resolvelib, PyYAML, packaging, jinja2, cryptography, ansible-core, ansible
Successfully installed MarkupSafe-2.0.1 PyYAML-5.4.1 ansible-4.3.0 ansible-core-2.11.3 cffi-1.14.6 cryptography-3.4.7 jinja2-3.0.1 packaging-21.0 pycparser-2.20 pyparsing-2.4.7 resolvelib-0.5.4
(venv-ansible) [astrocat@spiff:~/projects/serenity-ansible]
└─➤ $ ansible --version
ansible [core 2.11.3]
  config file = /home/astrocat/projects/serenity-ansible/ansible.cfg
  configured module search path = ['/home/astrocat/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/astrocat/projects/serenity-ansible/venv-ansible/lib/python3.9/site-packages/ansible
  ansible collection location = /home/astrocat/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/astrocat/projects/serenity-ansible/venv-ansible/bin/ansible
  python version = 3.9.6 (default, Jun 30 2021, 10:22:16) [GCC 11.1.0]
  jinja version = 3.0.1
  libyaml = True
(venv-ansible) [astrocat@spiff:~/projects/serenity-ansible]
└─➤ $ which ansible
/home/astrocat/projects/serenity-ansible/venv-ansible/bin/ansible

```

---

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 31, 2021, 6:42pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/12 "2021-07-31T18:42:28Z")

</div>

That may explain the packaging schema in Launchpad. It is indeed confusing. It would seem that Ansible-Core is just the entry points scripts like ansible-playbook, ansible-docs, etc. Where the Ansible-3 / Ansible-4 packages are plugins / modules to Core.

I’m not well versed in Ansible yet, but, that’s what it looks like from 30,000ft.

---

<div class="post-metadata">

**Author:** ![Buffy](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/buffy/32/497_2.png) [@Buffy](https://community.learnlinux.tv/u/Buffy)\
**Post date:** [July 31, 2021, 6:48pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/13 "2021-07-31T18:48:03Z")

</div>

Yeah, I think so too. It does work real nice, though! \o/

---

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 31, 2021, 6:49pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/14 "2021-07-31T18:49:27Z")

</div>

Looking at [PyPi Ansible](https://pypi.org/project/ansible/#history), the released version looks to be 4.3.0

So, one could do, in theory

```auto
python pip install ansible=4.3.0

```

I’ll try that and see how it goes.

---

<div class="post-metadata">

**Author:** ![Buffy](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/buffy/32/497_2.png) [@Buffy](https://community.learnlinux.tv/u/Buffy)\
**Post date:** [July 31, 2021, 6:50pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/15 "2021-07-31T18:50:57Z")

</div>

If you still have an older one installed, you might get lots of fussing about needing to uninstall the old one first…

---

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 31, 2021, 6:55pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/16 "2021-07-31T18:55:13Z")

</div>

It installed 4.3.0 by default when I used

```auto
pip install ansible

```

I just did the uninstall and it pulled out 4.3.0.

```auto

pip uninstall ansible

# Results

Proceed (Y/n)? y
  Successfully uninstalled ansible-4.3.0
(lltv) ki7mt@3950X:~ $ 

```

Reinstallation

```auto

pip install ansible

then

pip list

(lltv) ki7mt@3950X:~ $ pip list
Package Version
------------ -------------------
ansible 4.3.0
ansible-core 2.11.3
certifi 2021.5.30
cffi 1.14.6
cryptography 3.4.7
Jinja2 3.0.1
MarkupSafe 2.0.1
packaging 21.0
pip 21.2.2
pycparser 2.20
pyparsing 2.4.7
pyspark 3.0.1
PyYAML 5.4.1
resolvelib 0.5.4
setuptools 52.0.0.post20210125
wheel 0.36.2

```

---

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 31, 2021, 7:02pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/17 "2021-07-31T19:02:38Z")

</div>

Ok, I created a fresh venv, its definitely pulling ansible-core 2.11.3 and ansible 4.3.0

```auto

conda create lltv-1 python=3.8
conda activate lltv-1

then

pip list

(lltv-1) ki7mt@3950X:~ $ pip list
Package Version
---------- -------------------
certifi 2021.5.30
pip 21.1.3
pyspark 3.0.1
setuptools 52.0.0.post20210125
wheel 0.36.2

```

Now, Install Ansible and check packages again.

```auto
pip install ansible

(lltv-1) ki7mt@3950X:~ $ pip list
Package Version
------------ -------------------
ansible 4.3.0
ansible-core 2.11.3
certifi 2021.5.30
cffi 1.14.6
cryptography 3.4.7
Jinja2 3.0.1
MarkupSafe 2.0.1
packaging 21.0
pip 21.1.3
pycparser 2.20
pyparsing 2.4.7
pyspark 3.0.1
PyYAML 5.4.1
resolvelib 0.5.4
setuptools 52.0.0.post20210125
wheel 0.36.2

```

---

<div class="post-metadata">

**Author:** ![Buffy](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/buffy/32/497_2.png) [@Buffy](https://community.learnlinux.tv/u/Buffy)\
**Post date:** [July 31, 2021, 7:17pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/18 "2021-07-31T19:17:40Z")

</div>

Yeah, mine was a fresh venv too, I should have said and saved you a step… 😛

---

<div class="post-metadata">

**Author:** ![KI7MT](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/ki7mt/32/260_2.png) [@KI7MT](https://community.learnlinux.tv/u/KI7MT)\
**Post date:** [July 31, 2021, 7:19pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/19 "2021-07-31T19:19:11Z")

</div>

Now for the really confusing part.

[PyPi Ansible Core](https://pypi.org/project/ansible-core/) links back to Github Ansible. The old package on github [ansible-modules-core](https://github.com/ansible/ansible-modules-core) states that as of version 2.3, the core modules are part of the [main Ansible repository](https://github.com/ansible/ansible/tree/devel/lib/ansible/modules) under modules.

So, it looks as though the projects combined, and they are maintaining them in a single repo, but, keeping the core modules package versioning separate from the main Ansible package.

---

<div class="post-metadata">

**Author:** ![Buffy](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/buffy/32/497_2.png) [@Buffy](https://community.learnlinux.tv/u/Buffy)\
**Post date:** [July 31, 2021, 7:21pm UTC](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706/20 "2021-07-31T19:21:55Z")

</div>

Oh that is a confusing for sure; I hope they will sync the versioning going forward.

[Next page](https://community.learnlinux.tv/t/k3s-k8s-what-are-you-using-it-for/706.md?page=2)
