본문 바로가기

리눅스

쿠버네티스 인그레스 컨트롤러 설치

728x90

쿠버네티스(kubernetes) 인그레스 컨트롤러 설치

: 쿠버네티스 인그레스 컨트롤러 설치

https://kubernetes.io/ko/docs/concepts/services-networking/ingress-controllers/

베어메탈(Bare-metal)

  • NodePort 사용
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.4/deploy/static/provider/baremetal/deploy.yaml

또는

wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.4/deploy/static/provider/baremetal/deploy.yaml
mv deploy.yaml deploy-ingress-nginx.yaml
kubectl create -f deploy-ingress-nginx.yaml
$ kubectl create -f deploy-ingress-nginx.yaml 
namespace/ingress-nginx created
serviceaccount/ingress-nginx created
configmap/ingress-nginx-controller created
clusterrole.rbac.authorization.k8s.io/ingress-nginx created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx created
role.rbac.authorization.k8s.io/ingress-nginx created
rolebinding.rbac.authorization.k8s.io/ingress-nginx created
service/ingress-nginx-controller-admission created
service/ingress-nginx-controller created
deployment.apps/ingress-nginx-controller created
ingressclass.networking.k8s.io/nginx created
validatingwebhookconfiguration.admissionregistration.k8s.io/ingress-nginx-admission created
serviceaccount/ingress-nginx-admission created
clusterrole.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
role.rbac.authorization.k8s.io/ingress-nginx-admission created
rolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
job.batch/ingress-nginx-admission-create created
job.batch/ingress-nginx-admission-patch created

설치 확인

  • 서비스 확인
$ kubectl get services --namespace ingress-nginx                                     
NAME                                 TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
ingress-nginx-controller             NodePort    10.100.181.216   <none>        80:31257/TCP,443:31807/TCP   12m
ingress-nginx-controller-admission   ClusterIP   10.101.137.147   <none>        443/TCP                      12m
  • 파드 확인
$ kubectl get pods --namespace ingress-nginx
NAME                                        READY   STATUS      RESTARTS   AGE
ingress-nginx-admission-create--1-6rb8j     0/1     Completed   0          12m
ingress-nginx-admission-patch--1-rjk44      0/1     Completed   0          12m
ingress-nginx-controller-644555766d-26t7z   1/1     Running     0          12m

 

참고URL

- https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal

 

728x90