티스토리 뷰
아래 명령어로 ec2 shell에서 public ip를 알아낼 수 있습니다.
curl http://169.254.169.254/latest/meta-data/public-ipv4
nginx라는 이름의 svc에 nodePort알아내기
k get svc nginx -o=jsonpath="{.spec.ports[0].nodePort}"
32471포트에 curl날리기
curl $(curl http://169.254.169.254/latest/meta-data/public-ipv4):32471
public_ip:node_port 보기
echo $(curl http://169.254.169.254/latest/meta-data/public-ipv4):$(k get svc nginx -o=jsonpath="{.spec.ports[0].nodePort}")
nginx라는 이름의 svc에 curl해보기
curl $(curl http://169.254.169.254/latest/meta-data/public-ipv4):$(k get svc nginx -o=jsonpath="{.spec.ports[0].nodePort}")
728x90
'개발 > Infra' 카테고리의 다른 글
Docker빌드하고 띄우기 (0) | 2022.11.15 |
---|---|
AWS EC2 띄우기, docker설치 (0) | 2022.11.15 |
Linux SCP쓰는 법 (0) | 2021.12.10 |
Spring Boot에 configmap적용 (0) | 2021.12.10 |
고객사에 AWS서버 비용 청구 (0) | 2021.11.05 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 도커티슈박스
- shellscript
- Linux
- 이직
- docker container tissue box
- 도커티슈케이스
- docker container
- docker container case
- 도커각티슈케이스
- vim
- docker container tissue
- 개발자
- Sh
- docker container whale
- 2017 티스토리 결산
- 싱가폴
- 도커컨테이너
- 도커각티슈박스
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함