Reputation: 2211
We have a k8s cluster (private cluster) on which we are hosting some apis. Since yesterday the workflow deployment from Github to the k8s stopped with the error:
error: You must be logged in to the server (the server has asked for the client to provide credentials)
Error: Error: undefined
##[debug]Kubectl apply failed:Error: The process '/opt/hostedtoolcache/kubectl/1.26.11/x64/kubectl' failed with exit code 1
It was working perfectly. We didn't do any updates or code changes. This is the github workflow we are using:
deploy-to-k8s:
needs: push-api-image
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: setup kubectl
uses: azure/[email protected]
with:
version: 'v1.26.11' # default is latest stable
id: install
- name: Set the Kubernetes context
uses: azure/k8s-set-context@v3
with:
method: service-account
k8s-url: CLUSTER_URL
k8s-secret: ${{ secrets.SECRET }}
- name: Deploy to the k8s cluster
uses: azure/[email protected]
with:
namespace: default
skip-tls-verify: true
manifests: |
k8s/deployment.yaml
k8s/service.yaml
k8s/ingress.yaml
images: |
${{env.IMAGEURL}}:${{ github.sha }}
Any help is highly appreciated.
Upvotes: 0
Views: 185