Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1545e20

Browse filesBrowse files
committed
fix conflict
Signed-off-by: acfboy <acfboyu@outlook.com>
2 parents f668b9b + 56ff78a commit 1545e20
Copy full SHA for 1545e20

File tree

Expand file treeCollapse file tree

1 file changed

+89
-40
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+89
-40
lines changed

‎project/rkl/README.md

Copy file name to clipboardExpand all lines: project/rkl/README.md
+89-40Lines changed: 89 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77

8-
> 该项目基于Youki(https://github.com/youki-dev/youki) 实现CRI接口的相应功能,目前可以创建Pod,启动Pod,删除Pod,查看容器状态。
8+
> 该项目基于Youki(https://github.com/youki-dev/youki)实现CRI接口的相应功能,目前可以创建Pod,启动Pod,删除Pod,查看容器状态。
99
1010

1111

@@ -91,6 +91,15 @@ example: ./rkl run task.yaml
9191
example: ./rkl delete pod1
9292
9393
```
94+
✅进入Pod中的容器
95+
96+
./rkl exec [OPTIONS] <POD_NAME> <CONTAINER_ID> [COMMAND]...
97+
98+
```
99+
100+
example: ./rkl exec pod1 container1 -e PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/sh
101+
102+
```
94103

95104

96105

@@ -126,31 +135,38 @@ docker export $(docker create busybox) | tar -C rootfs -xvf -
126135

127136
支持扩充业务容器的数量
128137

129-
支持对容器 cpu 和内存资源限制
130-
131138
```yaml
132139
apiVersion: v1
140+
133141
kind: Pod
142+
134143
metadata:
135-
name: simple-container-task
136-
labels:
137-
app: my-app
138-
bundle: /home/Qiaoqia/Projects/rk8s/project/rkl/test/bundles/pause # bundle path of pause container
144+
145+
name: simple-container-task
146+
147+
labels:
148+
149+
app: my-app
150+
151+
bundle: /home/ich/rk8s/project/rkl/test/bundle-file/pause # bundle path of pause container
152+
139153
spec:
140-
containers:
141-
- name: main-container1
142-
image: /home/Qiaoqia/Projects/rk8s/project/rkl/test/bundles/busybox # bundle path
143-
args: #the arguments of config.json file
144-
- "dd"
145-
- "if=/dev/zero"
146-
- "of=/dev/null"
147-
ports:
148-
- containerPort: 80
149-
resources: # resource limit
150-
limits:
151-
cpu: "500m"
152-
memory: "512Mi"
153154

155+
containers:
156+
157+
- name: main-container1
158+
159+
image: /home/ich/rk8s/project/rkl/test/bundle-file/busybox # bundle path
160+
161+
args: #the arguments of config.json file
162+
163+
- "sleep"
164+
165+
- "10000"
166+
167+
ports:
168+
169+
- containerPort: 80
154170

155171
```
156172
@@ -304,6 +320,15 @@ PodSandbox ID: simple-container-task
304320
Pod simple-container-task created and started successfully
305321
306322
```
323+
exec:
324+
```
325+
326+
./rkl exec simple-container-task simple-container-task-main-container1 -e PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/sh
327+
328+
/ # ls
329+
bin dev etc home lib lib64 proc root sys tmp usr var
330+
```
331+
307332

308333

309334

@@ -388,7 +413,15 @@ Pod simple-container-task created and started successfully
388413

389414
`example: ./rkl delete pod1`
390415

391-
416+
✅ execute Pod
417+
418+
./rkl exec [OPTIONS] <POD_NAME> <CONTAINER_ID> [COMMAND]...
419+
420+
```
421+
422+
example: ./rkl exec pod1 container1 -e PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/sh
423+
424+
```
392425

393426
----------
394427

@@ -422,32 +455,39 @@ Currently, only the following YAML format is supported.
422455

423456
The number of business containers can be increased as needed.
424457

425-
Supports CPU and memory resource limitations for containers.
426-
427458
```yaml
428459

429460
apiVersion: v1
461+
430462
kind: Pod
463+
431464
metadata:
432-
name: simple-container-task
433-
labels:
434-
app: my-app
435-
bundle: /home/Qiaoqia/Projects/rk8s/project/rkl/test/bundles/pause # bundle path of pause container
465+
466+
name: simple-container-task
467+
468+
labels:
469+
470+
app: my-app
471+
472+
bundle: /home/ich/rk8s/project/rkl/test/bundle-file/pause # bundle path of pause container
473+
436474
spec:
437-
containers:
438-
- name: main-container1
439-
image: /home/Qiaoqia/Projects/rk8s/project/rkl/test/bundles/busybox # bundle path
440-
args: #the arguments of config.json file
441-
- "dd"
442-
- "if=/dev/zero"
443-
- "of=/dev/null"
444-
ports:
445-
- containerPort: 80
446-
resources: # resource limit
447-
limits:
448-
cpu: "500m"
449-
memory: "512Mi"
450475

476+
containers:
477+
478+
- name: main-container1
479+
480+
image: /home/ich/rk8s/project/rkl/test/bundle-file/busybox # bundle path
481+
482+
args: #the arguments of config.json file
483+
484+
- "sleep"
485+
486+
- "10000"
487+
488+
ports:
489+
490+
- containerPort: 80
451491

452492
```
453493
@@ -600,3 +640,12 @@ PodSandbox ID: simple-container-task
600640
Pod simple-container-task created and started successfully
601641

602642
```
643+
644+
exec:
645+
```
646+
647+
./rkl exec simple-container-task simple-container-task-main-container1 -e PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/sh
648+
649+
/ # ls
650+
bin dev etc home lib lib64 proc root sys tmp usr var
651+
```

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.