You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: Verify Kubernetes config permissions
command: chmod 600 /root/.kube/config
when: ansible_facts['user_id'] == 0 # Only run this when the user is root
you claimed you are following the guide to install awx, but you pasted a ansible playbook to install awx. is there any particular reason? I think the guide is using k8s manifest/helm charts to manage awx.
My helm version is 1.27.1
My helm version is 2.19.1
also, whichever your version is, try helm v3 first. v2 is deprecated long ago.
Please confirm the following
Bug Summary
I am trying to install AWX on kubernetes cluster using Helm and Ansible
I tried to follow https://www.linuxtechi.com/install-ansible-awx-on-kubernetes-cluster/.
But still getting errors
My helm version is 1.27.1
AWX Operator version
not sure
AWX version
not sure
Kubernetes platform
kubernetes
Kubernetes/Platform version
1.30
Modifications
no
Steps to reproduce
This is my current Ansible playbook file
name: Prepare directories for PostgreSQL
hosts: all
become: yes
tasks:
name: Ensure postgres user exists
user:
name: postgres
state: present
name: Create /mnt/storage directory
file:
path: /mnt/storage
state: directory
mode: "0755"
owner: postgres
group: postgres
name: Install AWX on Kubernetes using Helm
hosts: master_node
become: yes
collections:
kubernetes.core
vars:
helm_repo: "https://ansible-community.github.io/awx-operator-helm/"
helm_chart: "awx-operator"
k8s_namespace: "awx"
awx_cr: |
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
namespace: awx
spec:
service_type: nodeport
postgres_storage_class: local-storage # Specify the storage class for PostgreSQL
pv_config: |
apiVersion: v1
kind: PersistentVolume
metadata:
name: postgres-15-pv
namespace: awx
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
local:
path: /mnt/storage # Ensure this path exists on the node
storageClassName: local-storage
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- ubuntu-4gb-nbg1-2
pvc_config: |
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-15-awx-postgres-15-0
namespace: awx
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: local-storage
local_storage_config: |
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-storage
namespace: awx
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
tasks:
name: Add AWX Helm repository
command: helm repo add awx-operator "{{ helm_repo }}"
name: Update Helm repositories
command: helm repo update
name: Create AWX namespace if it doesn't exist
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: Namespace
metadata:
name: "{{ k8s_namespace }}"
name: Create Local Storage class
kubernetes.core.k8s:
state: present
definition: "{{ local_storage_config }}"
name: Create Persistent Volume if it doesn't exist
kubernetes.core.k8s:
state: present
definition: "{{ pv_config }}"
name: Create Persistent Volume Claim if it doesn't exist
kubernetes.core.k8s:
state: present
definition: "{{ pvc_config }}"
name: Install AWX Operator using Helm
command: helm install awx-operator awx-operator/"{{ helm_chart }}" --namespace "{{ k8s_namespace }}" --create-namespace
name: Deploy AWX using custom resource
copy:
content: "{{ awx_cr }}"
dest: /tmp/awx-cr.yml
name: Apply AWX custom resource
shell: kubectl apply -f /tmp/awx-cr.yml
name: Verify Kubernetes config permissions
command: chmod 600 /root/.kube/config
when: ansible_facts['user_id'] == 0 # Only run this when the user is root
name: Clean up temporary Helm GPG key
file:
path: /tmp/helm-signing.asc
state: absent
Expected results
Actual results
Additional information
My helm version is 2.19.1
Operator Logs
My OS is ubuntu 24.04
The text was updated successfully, but these errors were encountered: