Comments (21)
Tried adding sym link as noted in issues 195 & 184 and did not resolve the issue. Not sure what to try?
from raspberry-pi-dramble.
One thing I changed was in setup/networking/templates/hosts.j2
and changed line 12 to be
192.168.0.{{ 49 + loop.index }} kube{{ loop.index }} kube{{ loop.index }}.pidramble.com
That didn't quite fix my problem, but I think I was having an issue because I was trying to run Ansible in WSL on Windows.
When I switched to my linux machine, I was able to succsfully run the playbook.
from raspberry-pi-dramble.
Following is the IP addresses I decided to use and coded in my setup/networking/inventory file :
[dramble]
192.168.1.221
192.168.1.222
192.168.1.223
192.168.1.224
[dramble:vars]
ansible_ssh_user=pi
Below it the hosts.j2 settings
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 {{ dramble_hostname }}
{# Add an entry for each host in the cluster, using the loop index to map IPs #}
{% for host in groups['dramble'] %}
192.168.1.{{ 200 + loop.index }} kube{{ loop.index }} kube{{ loop.index }}.pidramble.com
{% endfor %}
I am assuming this is correct as the network setup ansible worked.
from raspberry-pi-dramble.
Also when I go to kube1 thru 4 and look at the /etc/hosts it looks correct. Here is what is in kube1 hosts file
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 kube1.pidramble.com
192.168.1.201 kube1 kube1.pidramble.com
192.168.1.202 kube2 kube2.pidramble.com
192.168.1.203 kube3 kube3.pidramble.com
192.168.1.204 kube4 kube4.pidramble.com
192.168.1.223 registry.pidramble.test
from raspberry-pi-dramble.
Sure it all depends on your network configuration. Just make the starting loop index one less than what you want to start with.
This was the only place where 10.0.100.X netmask is hardcoded.
from raspberry-pi-dramble.
The hosts files are correct on the PI's so I am assuming it worked correct. Since I started at 201 I updated hosts.j2 with the following
192.168.1.{{ 200 + loop.index }} kube{{ loop.index }} kube{{ loop.index }}.pidramble.com
from raspberry-pi-dramble.
I don't believe networking is the issue. Will post the ansible playbook response with the -vvv option
from raspberry-pi-dramble.
When running with the -vvv option it is very verbose so I have attached a file with the results. I think the error may be:
fatal: [kube1 -> 192.168.1.221]: FAILED! => changed=false
module_stderr: |-
/usr/lib/python3/dist-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (3.0.4) doesn't match a supported version!
ansible playbook error.txt
RequestsDependencyWarning)
from raspberry-pi-dramble.
Searching the above error resulted in Issue 201 where the resolution was they were running the wrong ansible version. Unfortunately the issue did not state what version was causing the issue and what version resolved it.
I'm running the following:
ansible 2.9.6
config file = /home/jdalke/raspberry-pi-dramble/ansible.cfg
configured module search path = ['/home/jdalke/.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.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0]
from raspberry-pi-dramble.
from raspberry-pi-dramble.
Running on Ubuntu 20.04
from raspberry-pi-dramble.
Sorry - on a dedicated linux box
from raspberry-pi-dramble.
You could look into installing a later version of Ansible directly from pip.
The only other thing I've changed is to a more recent version of Kubernetes in vars/main.yml
kubernetes_version: '1.22'
kubernetes_packages:
- name: kubelet=1.22.1-00
state: present
- name: kubectl=1.22.1-00
state: present
- name: kubeadm=1.22.1-00
state: present
- name: kubernetes-cni
state: present
from raspberry-pi-dramble.
PIP3 install did not work on Unbuntu as after the install the ansible --version gave me nothing. Installed using APT:
sudo add-apt-repository --yes --update ppa:ansible/ansible-2.10
Ansible version -
ansible [core 2.11.4]
config file = /home/jdalke/raspberry-pi-dramble/ansible.cfg
configured module search path = ['/home/jdalke/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/jdalke/.local/lib/python3.8/site-packages/ansible
ansible collection location = /home/jdalke/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0]
jinja version = 2.10.1
libyaml = True
Also update the vars/main.yml as directed and now getting the following error:
statically imported: /home/jdalke/raspberry-pi-dramble/tasks/k8s-services.yml
redirecting (type: modules) ansible.builtin.k8s to kubernetes.core.k8s
ERROR! couldn't resolve module/action 'k8s'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/home/jdalke/raspberry-pi-dramble/tasks/k8s-services.yml': line 10, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Apply metrics-server manifest to the cluster.
^ here
from raspberry-pi-dramble.
from raspberry-pi-dramble.
Running ansible-galaxy install -r requirements.yml provides the following so assuming everything okay
Starting galaxy role install process
[WARNING]: - geerlingguy.security (2.0.1) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.swap (1.0.2) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.nfs (2.0.0) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.pip (2.1.0) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.containerd (1.1.1) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.kubernetes (7.1.0) is already installed - use --force to change version to unspecified
[WARNING]: - geerlingguy.k8s_manifests (1.2.0) is already installed - use --force to change version to unspecified
Also I'm assuming I installed PIP3 under sudo as I can run PIP3 commands.
What version of linux are you running?
from raspberry-pi-dramble.
from raspberry-pi-dramble.
Downgraded to Ansible 2:10 and past first error and right back where I started:
TASK [Apply metrics-server manifest to the cluster.] ***************************************************************************************************************
fatal: [kube1 -> kube1]: FAILED! => changed=false
msg: 'Failed to get client due to HTTPConnectionPool(host=''localhost'', port=80): Max retries exceeded with url: /version (Caused by NewConnectionError(''<urllib3.connection.HTTPConnection object at 0x7f8ef8eef0>: Failed to establish a new connection: [Errno 111] Connection refused''))'
Very frustrating when these playbooks crap and your new to ansible. Looking at what the metrics-server is trying to do.
from raspberry-pi-dramble.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
from raspberry-pi-dramble.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
from raspberry-pi-dramble.
@jdalke Did you ever get past this error? I am currently feeling the frustration you expressed.
from raspberry-pi-dramble.
Related Issues (20)
- kubernetes-dashboard failing, exec format, I think the play installs amd64 HOT 2
- Issue ansible shutdown on Pi cluster HOT 2
- Failed to fetch package HOT 6
- No package matching 'containerd.io' is available HOT 1
- cluster provisioning failing
- Replace Blinkstick with Adafruit Neo Trinkey HOT 6
- ansible-playbook -i inventory main.yml failing HOT 2
- TASK [geerlingguy.containerd : Ensure containerd is installed.] HOT 4
- fatal: [kube4]: FAILED! => changed=false msg: apt cache update failed HOT 2
- `nfs-client-provisioner` won't start on Ubuntu Server 64-bit HOT 2
- Silencing a PoE powered Raspberry Pi cluster
- The need of ipv4 forward HOT 1
- Add new Pi Zero 2 W power benchmarks to site HOT 1
- microsd-benchmark iozone compile error HOT 3
- Network bridging not properly enabled HOT 3
- All net.bridge tasks are being skipped HOT 2
- ansible provisioning for vagrant fails HOT 2
- Install has fatal error on pi bramble HOT 3
- error while setup HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raspberry-pi-dramble.