You are on page 1of 2

FOR AZURE VM

mkdir azagent;

cd azagent;

curl -fkSL -o vstsagent.tar.gz https://vstsagentpackage.azureedge.net/agent/2.195.0/vsts-agent-linux-


x64-2.195.0.tar.gz;

tar -zxvf vstsagent.tar.gz;

if [ -x "$(command -v systemctl)" ]; then

./config.sh --environment --environmentname "testing-env" --acceptteeeula --agent


$HOSTNAME --url https://dev.azure.com/BAsfaw/ --work _work --projectname 'HindaProject' --auth PAT
--token yty6mo4o4vos3ovxfe7w2mscv3wtdtji6lz5v7mrvjnccyvz6nda --runasservice;

sudo ./svc.sh install;

sudo ./svc.sh start;

else ./config.sh --environment --environmentname "testing-env" --acceptteeeula --agent $HOSTNAME --


url https://dev.azure.com/BAsfaw/ --work _work --projectname 'HindaProject' --auth PAT --token
yty6mo4o4vos3ovxfe7w2mscv3wtdtji6lz5v7mrvjnccyvz6nda;

./run.sh;

Fi
FOR K8S

Run
kubectl config view --minify -o jsonpath={.clusters[0].cluster.server}
in your local shell to get server URL

Secret
Run following sequential commands to get the secret value:
1. Get service account secret names by running
kubectl get serviceAccounts <service-account-name> -n <namespace> -
o=jsonpath={.secrets[*].name}
2. Use the output in
kubectl get secret <service-account-secret-name> -n <namespace> -o json

You might also like