> For the complete documentation index, see [llms.txt](https://kawsing.gitbook.io/opensystem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kawsing.gitbook.io/opensystem/k8s/shi-yong-ubuntu-chan-ji-ce-shi.md).

# 使用Ubuntu單機測試

> 安裝MicroK8，使用snap安裝。Microk8s是輕量級的，可以在Ubuntu上本地部署所有Kubernetes服務。適用於：
>
> * **筆記本電腦：**&#x5728;本地開發微服務
> * **工作站：**&#x5728;本地開發和培訓機器學習模型
> * **CI管道：**&#x5FEB;速創建臨時Kubernetes以測試微服務
> * **物聯網設備：**&#x5C07;可升級的Kubernetes嵌入您的**物聯網設備**中以輕鬆進行升級
> * **小型邊緣雲：**&#x70BA;邊緣雲創建簡單的Kubernetes集群

sudo microk8s.start

sudo microk8s.status

sudo snap alias microk8s.kubectl kubectl

sudo kubectl

```
sudo kubectl cluster-info
Kubernetes master is running at https://127.0.0.1:16443
```

```
sudo microk8s.kubectl create deployment kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1
sudo microk8s.kubectl get pods
sudo usermod -a -G microk8s $USER
```

## snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks

```
sudo apparmor_parser -r /etc/apparmor.d/*snap-confine*
sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap-confine*
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/k8s/shi-yong-ubuntu-chan-ji-ce-shi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
