두 개의 컨테이너가있는 Kubernetes 배포를 선언했습니다. 하나는 로컬로 빌드되고 다른 하나는 개인 레지스트리에서 가져와야합니다.
const appImage = new docker.Image("ledgerImage", {
imageName: 'us.gcr.io/qwil-build/ledger',
build: "../../",
});
const ledgerDeployment = new k8s.extensions.v1beta1.Deployment("ledger", {
spec: {
template: {
metadata: {
labels: {name: "ledger"},
name: "ledger",
},
spec: {
containers: [
{
name: "api",
image: appImage.imageName,
},
{
name: "ssl-proxy",
image: "us.gcr.io/qwil-build/monolith-ssl-proxy:latest",
}
],
}
}
}
});
내가 실행 pulumi up
하면 중단됩니다-이것은 불만 때문에 발생합니다 You don't have the needed permissions to perform this operation, and you may have invalid credentials
. 내가 달릴 때이 불평을 본다 kubectl describe <name of pod>
. 그러나 내가 실행 docker pull us.gcr.io/qwil-build/monolith-ssl-proxy:latest
하면 잘 실행됩니다. 재회했지만 gcloud auth configure-docker
도움이되지 않았습니다.
https://github.com/pulumi/pulumi-cloud/issues/112를 찾았 지만 원격 이미지가 아닌 로컬 이미지 용임을 제안 docker.Image
하는 build
인수 가 필요한 것 같습니다 .
개인 레지스트리에서 이미지를 어떻게 가져올 수 있습니까?
편집하다:
필요한 SSL 프록시를 구축하기위한 로컬 dockerfile이 있습니다. 나는 새로운 선언 한 Image
과를
const sslImage = new docker.Image("sslImage", {
imageName: 'us.gcr.io/qwil-build/ledger-ssl-proxy',
build: {
context: "../../",
dockerfile: "../../Dockerfile.proxy"
}
});
그리고 이미지 참조를 Deployment
올바르게 업데이트했습니다 . 그러나 여전히 인증 문제가 발생합니다.
달리는 pulumi destroy --yes && pulumi up --skip-preview --yes
것이 내가 필요한 것이라고 밝혀졌습니다 . 이상한 불일치 상태에 있었던 것 같지만 지금은 수정되었습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다