클라우드 배우기
Kubernetes(K8S) pods 내 파일 복사 - Centos7 본문
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
'kubernetes' 카테고리의 다른 글
Kubernetes(K8S) Storage: Empty Dir - Centos7 (0) | 2023.09.14 |
---|---|
Kubernetes 복수 Pods 로 wordpres + mysql 설치 - Centos7 (0) | 2023.09.13 |
Kubernetes 단일 Pods 내 wordpress + mysql 설치 - Centos 7 (0) | 2023.09.13 |
Kubernetes(k8s) Deployments - Centos 7 (0) | 2023.09.13 |
Kubernetes(k8s) Replicas - Centos (0) | 2023.09.13 |