반응형
PV를 준비한것에 이어 igress controller를 구성하고자 한다.
가장 만만한것이 nginx이니 여기서 받아오자
wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/baremetal/deploy.yaml -o nginx-ingress.yaml
해당 yaml 파일은 namespace가 이미 지정되어 있기 때문에 (ingress-nginx)
그냥 바로 apply하면 된다.
kubectl apply -f ingress-nginx.yaml
------------------------------------------------------------------------
namespace/ingress-nginx created
serviceaccount/ingress-nginx created
serviceaccount/ingress-nginx-admission created
role.rbac.authorization.k8s.io/ingress-nginx created
role.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrole.rbac.authorization.k8s.io/ingress-nginx created
clusterrole.rbac.authorization.k8s.io/ingress-nginx-admission created
rolebinding.rbac.authorization.k8s.io/ingress-nginx created
rolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
configmap/ingress-nginx-controller created
service/ingress-nginx-controller created
service/ingress-nginx-controller-admission created
deployment.apps/ingress-nginx-controller created
job.batch/ingress-nginx-admission-create created
job.batch/ingress-nginx-admission-patch created
ingressclass.networking.k8s.io/nginx created
validatingwebhookconfiguration.admissionregistration.k8s.io/ingress-nginx-admission created
이제 ingress-nginx의 NodePort를 알아두자
kubectl get svc -n ingress-nginx
------------------------------------------------------------------------
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx-controller NodePort 10.105.81.137 <none> 80:31039/TCP,443:31171/TCP 60s
ingress-nginx-controller-admission ClusterIP 10.100.14.244 <none> 443/TCP 59s
31039 포트이니 접속 테스트를 해본다 (master node에서 테스트)
curl http://127.0.0.1:31039
------------------------------------------------------------------------
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
반응형
'인프라 관리 > ▷ Docker & Kubernetes' 카테고리의 다른 글
kubernetes환경에서 postgresql 구성하기 (StatefulSet) (0) | 2022.04.18 |
---|---|
Kuberentes 환경에서 Jenkins 구성하기 (0) | 2022.04.15 |
Synology NAS를 이용하여 NFS 기반 PV(Persistent Volume) 사용 준비 (0) | 2022.04.14 |
Kubernetes를 위한 Desktop App - Lens (0) | 2022.04.14 |
Kubernetes dashboard 설치 (0) | 2022.04.14 |