Кабринский Эдуард – Azure pipelines kubernetes – Кабринский Рдуард
Azure pipelines kubernetes
Azure pipelines kubernetes News headlines Azure pipelines kubernetes
Daniel’s Tech Blog
Cloud Computing, Cloud Native & Kubernetes
Using an Azure Pipelines agent on a k3s Kubernetes cluster on Raspbian
This is the second blog post out of three in a series covering k3s a new Kubernetes distribution by Rancher.
In this post we focus on the container image build and deployment of the Azure Pipelines agent on the k3s Kubernetes cluster we have set upped in the previous post.
So, how we get started with the Azure Pipelines agent container image build? Looking at the official Azure DevOps Services docs is our first step. Microsoft provides in the docs the necessary Dockerfile as well the required shell script.
Instead of using the original one I have modified the Dockerfile as stated in the notes to include zip and unzip. Also added a clean-up step of the folder /var/lib/apt/lists/ to keep the container image as small as possible. Furthermore, the base image must be exchanged against an ARM-based Linux image.
The start.sh shell script requires one adjustment. If you just copy the content from the docs, the shell script downloads the x64 Linux Azure Pipelines agent version. We need to replace linux-x64 with linux-arm instead in line 55.
The Dockerfile and start.sh file should be in the same folder before we kickoff the container image build. For the image build I am using the Azure Container Registry to build and store the final container image. We only need the Azure CLI and an ACR instance for it. The command az acr build —registry azstcr —image “azp:0.0.1” —image “azp:latest” . kicks off the build and tells ACR to tag the image as version 0.0.1 and latest .
After the container image build, we create an agent pool and PAT (Personal Access Token) in Azure DevOps.
Both steps are required to create the Kubernetes secret for our Azure Pipelines agent deployment.
We need to create two Kubernetes secrets in total to be able to do the deployment of the Azure Pipelines agent on our k3s Kubernetes cluster.
First, we create the secret for the agent itself that contains the Azure DevOps URL to our organization and the PAT.
Finally, to pull the container image from the Azure Container Registry we create the Docker credentials secret.
We are now ready for the Azure Pipelines agent deployment. For that I have created a template file which will be applied onto the k3s Kubernetes cluster via kubectl .
The only things you need to modify in the template file are the values for the imagePullSecrets , the image and the environment variable AZP_POOL for the Azure DevOps agent pool name.
Now run kubectl apply -f azpagent.yaml to deploy the agent. The startup phase of the agent can be followed by running kubectl logs -f azp-agent-57bb7cb4f6-xngph .
When everything works as expected the Azure Pipelines agent should show up in Azure DevOps.
Azure pipelines kubernetes
Azure pipelines kubernetes
Azure pipelines kubernetes Top news stories today Azure pipelines kubernetes
Azure pipelines kubernetes
Daniel’s Tech Blog Cloud Computing, Cloud Native & Kubernetes Using an Azure Pipelines agent on a k3s Kubernetes cluster on Raspbian This is the second blog post out of three in a series
Azure pipelines kubernetes
Azure pipelines kubernetes Azure pipelines kubernetes Azure pipelines kubernetes
SOURCE: Azure pipelines kubernetes Azure pipelines kubernetes Azure pipelines kubernetes
#tags# -,-Azure pipelines kubernetes] Azure pipelines kubernetes#tags#
Eduard Kabrinskiy
daily news
Viðmerkingar
Skriva eina viðmerking