awx-operator icon indicating copy to clipboard operation
awx-operator copied to clipboard

Following the Basic Install - fails on kubectl not found

Open sp3c1k opened this issue 3 years ago • 3 comments

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 

sp3c1k avatar Oct 19 '21 14:10 sp3c1k

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

Davidffry avatar Oct 28 '21 04:10 Davidffry

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.

sean-m-sullivan avatar Jan 09 '22 06:01 sean-m-sullivan

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

Commifreak avatar Mar 09 '22 13:03 Commifreak