[Kubernetes] ํ๋๋ ๊ฒฐ๊ตญ ํ๋ฒํ ํ๋ก์ธ์ค๋ผ๊ตฌ์ง!
DevOps/Kubernetes
2023. 5. 9. 22:44
์ฟ ๋ฒ๋คํฐ์ค์์ ์คํ ์ค์ธ ํ๋์ ๋ด์ฉ์ ์์ ํ๋ ค๋ฉด kubectl exec -it pod -- ... ๋ฅผ ํตํด ์์ ํฉ๋๋ค. ๋ง์ฝ nginx ๋ฅผ ์คํ ์ค์ธ ํ๋๊ฐ ์๊ณ , nginx ์ index.html ์ ์์ ํ๊ณ ์ถ๋ค๋ฉด, ์๋์ ๊ฐ์ด ์งํ์ ํ ๊ฒ์ ๋๋ค. # pod ๋ผ๋ ์ด๋ฆ์ ๊ฐ์ง ํ๋๋ฅผ nginx ์ด๋ฏธ์ง๋ฅผ ์ด์ฉํด์ ์์ฑ kubectl run pod --image nginx # bash ๋ฅผ ํตํด ์ปจํ ์ด๋ ๋ด๋ถ ์ ์ kubectl exec -it pod -- bash # index.html ์ ๊ฒ์ find ./ -type f -iname "*.html" # ์์น๋ฅผ ์ฐพ์ ํ vim ์ ํตํด ์์ vim ./usr/share/nginx/html/index.html index.html ์ I'm kingbj..