40 lines
548 B
Markdown
40 lines
548 B
Markdown
# MicroK8s
|
|
|
|
|
|
## Usage
|
|
|
|
* Create `pod.yaml` configuration
|
|
```yaml
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: harry-podder
|
|
spec:
|
|
containers:
|
|
- name: shell
|
|
image: localhost:47111/alpine
|
|
command:
|
|
- "/bin/bash"
|
|
- "-c"
|
|
- "sleep 10000"
|
|
volumeMounts:
|
|
- name: root
|
|
mountPath: /mnt/root
|
|
volumes:
|
|
- name: root
|
|
hostPath:
|
|
path: /
|
|
type: Directory
|
|
```
|
|
|
|
* Deploy the pod
|
|
```sh
|
|
microk8s kubectl apply -f pod.yaml
|
|
```
|
|
* Run the Pod
|
|
```sh
|
|
microk8s kubectl exec -it harry-podder -- /bin/bash
|
|
```
|
|
|
|
|