Summary
microk8s kubectl apply -k
Has issues resolving paths.
What Should Happen Instead?
I discovered this problem while trying to deploy awx on microk8s. See the installation instructions here :
https://github.com/ansible/awx-operator#basic-install
The correct behavior is that when I execute
in a directory containing a properly formatted kustomization.yaml file, the awx deployment should take effect.
What is seen however is the following
root@microk8s:~# microk8s kubectl apply -k .
error: accumulating resources: accumulation err='accumulating resources from 'github.com/ansible/awx-operator/config/default?ref=2.2.1': evalsymlink failure on '/root/github.com/ansible/awx-operator/config/default?ref=2.2.1' : lstat /root/github.com: no such file or directory': git cmd = '/snap/microk8s/5219/usr/bin/git fetch --depth=1 origin 2.2.1': exit status 128
Reproduction Steps
- Install microk8s on a fresh Ubuntu 22.04 LTS system using snap
- Create a file named kustomization.yaml containing the following text
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- github.com/ansible/awx-operator/config/default?ref=2.2.1
images:
- name: quay.io/ansible/awx-operator
newTag: 2.2.1
namespace: awx
- execute
microk8s kubectl apply -k .
Introspection Report
I don't have a fresh installation, the reproduction steps are consistent on every machine I've tried.
Can you suggest a fix?
I'm not sure about a fix, but this is a temporary work around.
Install kustomize on its own following the instructions on their website.
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
Which installs kustomize in the current directory. Then use kustomize in "legacy form"
./kustomize build | microk8s kubectl apply -f -
Are you interested in contributing with a fix?
no, thought I am willing to test the fix if one is provided.
Summary
Has issues resolving paths.
What Should Happen Instead?
I discovered this problem while trying to deploy awx on microk8s. See the installation instructions here :
https://github.com/ansible/awx-operator#basic-install
The correct behavior is that when I execute
kubectl apply -k .in a directory containing a properly formatted kustomization.yaml file, the awx deployment should take effect.
What is seen however is the following
Reproduction Steps
microk8s kubectl apply -k .Introspection Report
I don't have a fresh installation, the reproduction steps are consistent on every machine I've tried.
Can you suggest a fix?
I'm not sure about a fix, but this is a temporary work around.
Install kustomize on its own following the instructions on their website.
Which installs kustomize in the current directory. Then use kustomize in "legacy form"
./kustomize build | microk8s kubectl apply -f -Are you interested in contributing with a fix?
no, thought I am willing to test the fix if one is provided.