I am trying to deploy my application into Rancher managed kubernetes cluster RKE. I have created pipeline in gitlab using auto devops. But when the helm chart is trying to deploy I get this error. Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
Below is my deploy script:
deploy:
stage: deploy
image: cdrx/rancher-gitlab-deploy
only:
- master
script:
- apk --no-cache add curl
- curl -L https://get.helm.sh/helm-v3.3.0-rc.1-linux-amd64.tar.gz > helm.tar.gz
- tar -zxvf helm.tar.gz
- mv linux-amd64/helm /usr/local/bin/helm
- helm install mychart ./mychart
Could someone help me in resolving this issue