ansible / awx-operator

An Ansible AWX operator for Kubernetes built with Operator SDK and Ansible. 🤖
https://www.github.com/ansible/awx
Apache License 2.0
1.26k stars 633 forks source link

Following the Basic Install - fails on kubectl not found #614

Open sp3c1k opened 3 years ago

sp3c1k commented 3 years ago

Hello,

after the change of the deployment method, it may be worth mentioning in the Readme - Basic Install section, that using an alias alias kubectl="minikube kubectl --" is not enough, as it will not get you through the deployment...

ubuntu@awx-test:~/awx-operator$ make deploy
cd config/manager && /home/ubuntu/awx-operator/bin/kustomize edit set image controller=quay.io/ansible/awx-operator:0.14.0
cd config/default && /home/ubuntu/awx-operator/bin/kustomize edit set namespace awx
/home/ubuntu/awx-operator/bin/kustomize build config/default | kubectl apply -f -
/bin/sh: 1: kubectl: not found
make: *** [Makefile:82: deploy] Error 127

Making a bash script in /usr/local/bin/ named kubectl like this solved the problem.

#!/bin/bash
args="$@"
minikube kubectl -- $args 
Davidffry commented 3 years ago

You can also change the makefile, replace kubectl to minikube kubectl -- .But you're right about it

sean-m-sullivan commented 2 years ago

if anyone is wondering, at least for 0.15.0, change line 82 to this $(KUSTOMIZE) build config/default | minikube kubectl -- apply -f - as Davidffry said, this change makes it work.

Commifreak commented 2 years ago

But this should work with the alias only - but it doesnt. Any fix in sight?