operator-sdk scaffold ๋งŒ๋“ค๊ธฐ

operator-sdk init

operator-sdk init --domain=[๋„๋ฉ”์ธ] --repo=github.com/[your repo]

 

ํ˜น์‹œ๋‚˜ project๊ฐ€ ์ œ๋Œ€๋กœ ์ƒ์„ฑ์ด ์•ˆ๋˜๊ฑฐ๋‚˜ ํ•˜์‹ ๋ถ„๋“ค์€ ์œ„์ฒ˜๋Ÿผ = ๊ธฐํ˜ธ๋ฅผ ์ถ”๊ฐ€ํ•ด๋ณด์„ธ์š”

 

init ์ดํ›„ working directory ๊ตฌ์กฐ

 

 

 

operator-sdk create api

operator-sdk create api --group=[group] --version=v1alpha1 --kind=[kind] --resource --controller

 

์œ„ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด api๋ฅผ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค.

 

  • group : ์„œ๋กœ ๋‹ค๋ฅธ ๋ฆฌ์†Œ์Šค๋ฅผ ๊ทธ๋ฃนํ™”ํ•˜๋Š” ๊ฒƒ
  • kind : ๋ฆฌ์†Œ์Šค์˜ ์œ ํ˜•
  • resource : ํด๋Ÿฌ์Šคํ„ฐ์—์„œ ์‹คํ–‰๋˜๋Š” ์ž‘์—… ํ˜น์€ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ํ•„์š”ํ•œ ๊ฐœ์ฒด
  • controller : ํด๋Ÿฌ์Šคํ„ฐ ๋‚ด์—์„œ ๋ฆฌ์†Œ์Šค ์ƒํƒœ๋ฅผ ๊ด€๋ฆฌํ•˜๊ณ  ์œ ์ง€ํ•˜๋Š” ์—ญํ•