# Kubernetes

***업데이트: Roboflow Enterprise Customer라면 다음을 사용하여 Kubernetes 환경에 Roboflow Inference Service를 배포할 수 있습니다*** [***이 Helm chart***](https://github.com/roboflow/inference/tree/main/inference/enterprise/helm-chart)***.***

또는 Kubernetes cluster에 pod와 service를 배포하기 위한 간단한 Kubernetes manifest가 아래에 있습니다.

아래 Kubernetes manifest는 단일 CPU 기반 roboflow infer pod를 생성하고 cluster-IP service를 연결하는 간단한 예시를 보여줍니다.

```yaml
# Pod
---
apiVersion: v1
kind: Pod
metadata:
  name: roboflow
  labels:
    app.kubernetes.io/name: roboflow
spec:
  containers:
  - name: roboflow
    image: roboflow/roboflow-inference-server-cpu
    ports:
    - containerPort: 9001
      name: rf-pod-port


# Service
---
apiVersion: v1
kind: Service
metadata:
  name: rf-service
spec:
  type: ClusterIP
  selector:
    app.kubernetes.io/name: roboflow
  ports:
  - name: rf-svc-port
    protocol: TCP
    port: 9001
    targetPort: rf-pod-port
```

(위 예시는 Kubernetes cluster가 Docker hub에서 이미지를 다운로드할 수 있다고 가정합니다)

위의 yaml 요약본을 다음 이름으로 저장하세요 `roboflow.yaml` 그리고 `kubectl` cli를 사용하여 pod와 service를 Kubernetes cluster의 default namespace에 배포하세요.

```
kubectl apply -f roboflow.yaml
```

\
service(ClusterIP 유형)가 생성됩니다. 다음 URI에서 Kubernetes cluster 내부로부터 Roboflow inference에 액세스할 수 있습니다: `http://rf-service.default.svc:9001`

### 이 예시를 넘어서

Kubernetes는 Roboflow inference service에 여러 고급 기능과 확장 기능을 통합할 수 있는 강력한 기능을 제공합니다. 예를 들어, 다음과 같은 더 고급 사용 사례로 위의 예시를 확장할 수 있습니다

* nodeSelectors를 사용하여 pod를 Kubernetes 환경 내의 GPU 머신 node pool에 호스팅하고 다음을 사용하는 것 `roboflow/inference-server:gpu` image
* Roboflow inference service를 수평으로 autoscale하기 위한 Kubernetes deployment를 생성하고 CPU 사용량과 같은 특정 metric을 기반으로 autoscaling trigger를 설정하는 것.
* nodePort와 LoadBalancer 같은 다른 service type을 사용하여 Roboflow inference service를 외부에 제공하는 것
* ingress controller를 사용하여 TLS(HTTPs) 등을 통해 Roboflow inference를 노출하는 것.
* Roboflow inference service에 monitoring과 alerting을 추가하는 것
* license server와 offline mode를 통합하는 것


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roboflow.com/roboflow/roboflow-ko/deploy/enterprise-deployment/kubernetes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
