Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Amazon ECRをAWSの外から使う / Docker Meetup Kansai #5 ...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
sasaki
November 22, 2019
Technology
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Amazon ECRをAWSの外から使う / Docker Meetup Kansai #5 AmazonECR
sasaki
November 22, 2019
More Decks by sasaki
See All by sasaki
FinOpsとタグ付け防止対策 / CCoE Osaka FinOps Tags
taishin
1
320
Glacierだからってコストあきらめてない? / JAWS Meet Glacier Cost
taishin
1
470
スケールするプロダクトと膨らむ組織 SREの挑戦と解決策 / Findy Job LT SRE
taishin
0
190
組織の変化とSREの役割進化 責務拡大にどう応えるか / globis_sre
taishin
0
450
Lambdaの運用についてのなにか / lambda_unyo
taishin
0
220
おすすめAWSコスト対策 / AWS Startup Meetup Osaka AWS Cost
taishin
1
540
プラットフォームってつくることより計測することが重要なんじゃないかという話 / Platform Engineering Meetup #8
taishin
1
1.6k
ECS Runtime Monitoring で コンテナランタイムセキュリティに入門 / nakanoshima-dev-ecs-runtime-monitoring
taishin
0
390
JAWS-UG-Osaka-guardrail
taishin
0
430
Other Decks in Technology
See All in Technology
品質と信頼性を地続きにする
grimoh
0
710
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
340
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
12k
JSONataとAWS Step Functionsで目指すRuntimelessな世界
mu7889yoon
0
120
DEFCON34-Write-up_HYCu-MYCu
daikiokazaki
0
160
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
130
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
4
640
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
680
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
0
130
データ_AIの事業の勝敗をわけるもの
nek0128
1
430
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
3
510
ソフトウェアDNAとクラウドエージェントのススメ
cloudace
0
110
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
290
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
It's Worth the Effort
3n
188
29k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
460
Transcript
%PDLFS.FFUVQ,BOTBJ "NB[PO&$3Λ"84ͷ֎͔Β͏ ࠤʑਅ
8IP Shinya Sasaki Head of Infrastructure Engineering at AlpacaJapan Co.,
Ltd. Osaka, Japan
"NB[PO&MBTUJD$POUBJOFS3FHJTUSZ "NB[PO&$3 w "84͕ఏڙ͢ΔϓϥΠϕʔτίϯςφϨδετϦ w
&$3ྉۚ w ετϨʔδ w 64%(# w σʔλసૹ *O w
ແྉ w σʔλసૹ 0VU w ˠ w ಉҰϦʔδϣϯͷ&$ͱͷσʔλసૹແྉ ౦ژϦʔδϣϯɺݱࡏ https://aws.amazon.com/jp/ecr/pricing/
ࢀߟ %PDLFS)VCͷྉۚ ݱࡏ https://hub.docker.com/pricing
ࢀߟ %PDLFSVCͷྉۚ https://aws.amazon.com/jp/about-aws/whats-new/2019/10/announcing-image-scanning-for-amazon-ecr/
Ұൠతͳ
ύϒϦοΫϨδετϦ͔Βͷ1VMM Public Repository docker pull (Image) Download
ϓϥΠϕʔτϨδετϦ͔Βͷ1VMM Private Repository docker pull (Image) Download docker login -u
(User) -p (Pass) (URL) Login Succeeded
"NB[PO&$3͔Βͷ1VMM
"84αʔϏε͔Β&$3Πϝʔδͷ1VMM ECR AWS Account docker pull (Image) Download EKS ECS
IAM Role IAM Role ECR͔ΒͷPull͕ڐՄ͞ΕͨϙϦγʔ
"84αʔϏε͔Βͷ1VMM ΫϩεΞΧϯτ ECR AWS Account A docker pull (Image) Download
EKS ECS IAM Role IAM Role ECR͔ΒͷPull͕ڐՄ͞ΕͨϙϦγʔ AWS Account B ผΞΧϯτΛڐՄ͢ΔϙϦγʔ
"84֎͔Βͷ&$3Πϝʔδͷ1VMM ECR AWS Account GetAuthorizationToken (aws ecr get-login) Token docker
login -u AWS -p (Token) (ECR URL) Login Succeeded docker pull (Image) Download ECR͔ΒͷPull͕ڐՄ͞ΕͨϙϦγʔ
"84֎ͷLT͔Βͷ1VMM ECR AWS Account aws ecr get-login Other k8s cluster
"NB[PO&$3%PDLFS$SFEFOUJBM)FMQFS w BXTFDSHFUMPHJO͕ෆཁʹͳΔ w EPDLFSͷDSFEFOUJBMIFMQFSΛ͏ w શϊʔυʹΫϨσϯγϟϧΛஔ͘ʁ https://github.com/awslabs/amazon-ecr-credential-helper
*NBHF1VMM4FDSFUTΛ͍͍͑Β͍͠ kubectl create secret docker-registry <name> \ --docker-server=DOCKER_REGISTRY_SERVER \ --docker-username=DOCKER_USER
\ --docker-password=DOCKER_PASSWORD \ --docker-email=DOCKER_EMAIL
https://docs.aws.amazon.com/ja_jp/AmazonECR/latest/userguide/ECR_AWSCLI.html This command provides an authorization token that is valid
for the specified registry for 12 hours.
https://medium.com/@damitj07/how-to-configure-and-use-aws-ecr-with-kubernetes-rancher2-0-6144c626d42c
https://medium.com/@damitj07/how-to-configure-and-use-aws-ecr-with-kubernetes-rancher2-0-6144c626d42c aws ecr get-login ͯ͠ɺ imagePullSecret Λ࡞Γ͢jobΛ ͓͖̒࣌ؒʹ࣮ߦ(cronjob)ͤ͞Δ
https://medium.com/@damitj07/how-to-configure-and-use-aws-ecr-with-kubernetes-rancher2-0-6144c626d42c - /bin/sh - -c - |- ACCOUNT=1234567890 REGION=my-region-1 SECRET_NAME=${REGION}-ecr-registry
[email protected]
TOKEN=`aws ecr get-login --region ${REGION} --registry-ids ${ACCOUNT} | cut -d' ' -f6` kubectl delete secret --ignore-not-found $SECRET_NAME kubectl create secret docker-registry $SECRET_NAME \ --docker-server=https://${ACCOUNT}.dkr.ecr.${REGION}.amazonaws.com \ --docker-username=AWS \ --docker-password="${TOKEN}" \ --docker-email="${EMAIL}" echo "Secret created by name. $SECRET_NAME" kubectl patch serviceaccount default -p '{"imagePullSecrets":[{"name":"'$SECRET_NAME'"}]}'
·ͱΊ w &$3ʹϩάΠϯ͢ΔͨΊʹ5PLFOͷऔಘ͕ඞཁ w 5PLFOͷ༗ޮظݶ࣌ؒͳͷͰ"84Ҏ֎ͷLT͔Β͏ ߹ߋ৽͢ΔΈ͕ඞཁ w ͬͱ͍͍ํ๏͕͋Εڭ͑ͯԼ͍͞
5IBOLZPV