action i have written :
- name: Run the kubectl command
run: kubectl version --output=yaml
above will be run on “ubuntu-latest” runner
Output:
action i have written :
above will be run on “ubuntu-latest” runner
Output:
Are you doing the lab, or are you trying to install ArgoCD locally, and do it that way?
yes. i’m doing lab session on githun action.
A link to the lab would be very useful here.
here is the lab link
github-actions-solar-system
repository within feature/workflow
branchExplore and modify the workflow file named solar-system.yml
dev-deploy
ubuntu-latest
docker
job.azure/setup-kubectl
action to Install Kubectl with the below configazure/k8s-set-context
action to set kube context using below configkubeconfig
kubectl version --short -o yaml
That explains a good deal. THIS IS NOT ARGOCD!! I’ll change the title, deal with this later.
OK, the problem here – and I’m not sure why this is – but the kubeconfig file supplied in the lab won’t work in the github actions environment, since it assumes that there is an apiserver at 127.0.0.1:6443. Which there won’t be. Not sure why the lab does this, since that can’t work. For the lab to work, you need to
The only thing I can think of is that they designed the lab to do a test of kubectl that might return a zero exit code, i.e., kubectl version --short
, even when the cluster is not accessible. As it would not be with the supplied kubeconfig file.