-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ansible playbook failing at "Deploy Database Directly" (Chap 01 / non-standard Vagrant box) #32
Comments
Adding: I was able to use the image to continue through Chapter 1 until I got to the sample application. As a result of the failures above, K3S did not install properly. I manually installed K3S using the script at http://get.k3s.io, and it runs satisfactorily. But obviously the sample application did not install and start, so there are no pods running with the application or database. |
@jeff-tillinghast I think it'll be a challenge to get this working, if it's at all possible. The following change will allow k3s to install successfully and diff --git a/setup/roles/k3s/defaults/main.yaml b/setup/roles/k3s/defaults/main.yaml
index 73fc135..5248305 100644
--- a/setup/roles/k3s/defaults/main.yaml
+++ b/setup/roles/k3s/defaults/main.yaml
@@ -1,3 +1,3 @@
---
-k3s_version: "v1.23.4+k3s1"
-k3s_url: https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/k3s
\ No newline at end of file
+k3s_version: "v1.30.1+k3s1"
+k3s_url: https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/k3s-arm64
\ No newline at end of file The next issue occurs within the VM when K8s attempts to start the
Examining the logs:
which is due to the |
Hi @disposedtrolley, @jeff-tillinghast, thanks for the discussion. This is exactly where I got too with Vagrant and Parallels and the box
@AlanHohn Are there any ambitions to provide multi-architecture images, e.g. built with Best regards, |
Hi all-- Because I'm running on an M1 Mac, I'm trying to make a non-standard local Vagrant configuration work. I'm running Vagrant with Parallels using box
bento/ubuntu-22.04-arm64
(the recommended box per Parallels). In the Vagrantfile, I've changed line 12 to point to the according box, and line 18 to change from :virtual_box to :parallels. The box builds, and the playbook initiates through 'TASK [todo : python prerequisites]', but then it loses the plot-- it skips the next three steps and finally hits failure loop with multiple failures in 'deploy database directly', all referencing 'Invalid kube-config file. No configuration found.':Output
TASK [todo : python prerequisites] *********************************************
changed: [host01]
TASK [todo : manifests directory] **********************************************
skipping: [host01]
TASK [todo : stage manifests] **************************************************
skipping: [host01] => (item=database.yaml)
skipping: [host01] => (item=application.yaml)
skipping: [host01] => (item=service.yaml)
skipping: [host01] => (item=scaler.yaml)
skipping: [host01]
TASK [todo : deploy database using operator] ***********************************
skipping: [host01]
TASK [todo : deploy database directly] *****************************************
FAILED - RETRYING: [host01]: deploy database directly (10 retries left).
[...]
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.kubernetes.core.plugins.module_utils.k8s.exceptions.CoreException: Could not create API client: Invalid kube-config file. No configuration found.
failed: [host01] (item=pvc.yaml.j2) => {"ansible_loop_var": "item", "attempts": 10, "changed": false, "item": "pvc.yaml.j2", "msg": "Could not create API client: Invalid kube-config file. No configuration found."}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.kubernetes.core.plugins.module_utils.k8s.exceptions.CoreException: Could not create API client: Invalid kube-config file. No configuration found.
failed: [host01] (item=database-secret.yaml.j2) => {"ansible_loop_var": "item", "attempts": 10, "changed": false, "item": "database-secret.yaml.j2", "msg": "Could not create API client: Invalid kube-config file. No configuration found."}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.kubernetes.core.plugins.module_utils.k8s.exceptions.CoreException: Could not create API client: Invalid kube-config file. No configuration found.
failed: [host01] (item=database-deploy.yaml.j2) => {"ansible_loop_var": "item", "attempts": 10, "changed": false, "item": "database-deploy.yaml.j2", "msg": "Could not create API client: Invalid kube-config file. No configuration found."}
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.kubernetes.core.plugins.module_utils.k8s.exceptions.CoreException: Could not create API client: Invalid kube-config file. No configuration found.
failed: [host01] (item=database-service.yaml.j2) => {"ansible_loop_var": "item", "attempts": 10, "changed": false, "item": "database-service.yaml.j2", "msg": "Could not create API client: Invalid kube-config file. No configuration found."}
PLAY RECAP *********************************************************************
host01 : ok=11 changed=10 unreachable=0 failed=1 skipped=3 rescued=0 ignored=0
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
/Output
The only other modification I made to the Vagrant was adding 'ansible.compatibility_mode = "2.0" to both of the 'config.vm.provision' blocks in response to output during my first test run. But adding/removing that condition doesn't affect the results or the output above.
Thanks for any help!
The text was updated successfully, but these errors were encountered: