Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
more
Archives
Today
Total
관리 메뉴

클라우드 배우기

Kubernetes(K8S) pods 내 파일 복사 - Centos7 본문

kubernetes

Kubernetes(K8S) pods 내 파일 복사 - Centos7

새싹싹이 2023. 9. 13. 16:55

vi index.html 

<html>
<body>
<h1>K8S-CPTEST-WEBSERVER</h1>
</body>
</html>

 

nginx 로 pod 생성

kubectl run app-nginx --image nginx --port 80

kubedctl get pods -o wide

kubectl cp index.html app-nginx:/usr/share/nginx/html/index.html

lynx 10.42.0.1

 

http 로 pod 생성

kubectl run app-http --image httpd --port 80

kubectl get pods -o wide

kubectl cp index.html app-ninx:/usr/local/apache2/htdocs/html/index.html

lynx 10.32.0.2