# 访问 Kubernetes 集群

根据用户部署和暴露服务的方式不同，有很多种方式可以用来访问 kubernetes 集群。

* 最简单也是最直接的方式是使用 `kubectl` 命令。
* 其次可以使用 `kubeconfig` 文件来认证授权访问 API server。
* 通过各种 proxy 经过端口转发访问 kubernetes 集群中的服务
* 使用 Ingress，在集群外访问 kubernetes 集群内的 service


---

# 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://doc.cncf.vip/kubernetes-handbook/yong-hu-zhi-nan/access-kubernetes-cluster.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.
