Hello together,
I am currently trying to get a Rancher 2.3 pipeline working. The pipeline executes successful but I can not deploy the image afterwords. I suspect that the local docker-registry is not found as the deployment can not pull the image.
I generated my build pipeline via gui. It looks as follows:
stages:
- name: Build
steps:- publishImageConfig:
dockerfilePath: ./Dockerfile
buildContext: .
tag: percona:8.0.15
registry: 127.0.0.1:34513
- publishImageConfig:
- name: Deploy
steps:- applyYamlConfig:
path: ./deployment.yaml
timeout: 60
notification: {}
- applyYamlConfig:
and my deployment file looks as follows:
apiVersion: apps/v1
kind: Deployment
metadata:
name: percona
labels:
app: percona
spec:
replicas: 1
selector:
matchLabels:
app: percona
template:
metadata:
labels:
app: percona
spec:
imagePullSecrets:
- name: pipeline-docker-registry
containers:
- name: percona
image: percona:8.0.15
ports:
- containerPort: 3306
So I am wondering about the registry entry registry: 127.0.0.1:34513 which was generated. I would assume, that it it not guaranteed that all pods of the deployment run on the same node, i.e. I assume that localhost address here is wrong. Unfortunately, when setting up the pipeline it seems I cannot configure any specifics on the registry.
And I do have two further conceptional question, as I would like to create an deploy a database image with the build pipeline. I would like to enforce a rebuild of the pipeline on a manual base only, not when a commit or tag happens on the connected git repository. Seems this is not an option?
Second question, when manually enforcing a rebuild of the image, I would like the new image to reuse a persistent volume of a database image that is replaced. How could I do this?
Thanks for your help! I am rather new to the entire kubernetes world, hence I hope my questions are not to stupid
Best regards,
Christoph