Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Kubectl Debug
Commits
f08222fa
Commit
f08222fa
authored
5 years ago
by
calmkart
Committed by
Aylei
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
FIX:issue58, k8s v1.16 daemonset apiVersion change to apps/v1 (#64)
parent
1e505fe2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+6
-1
README.md
contrib/helm/kubectl-debug/templates/agent-ds.yaml
+4
-0
contrib/helm/kubectl-debug/templates/agent-ds.yaml
docs/zh-cn.md
+7
-2
docs/zh-cn.md
scripts/agent_daemonset.yml
+1
-1
scripts/agent_daemonset.yml
with
18 additions
and
4 deletions
+18
-4
README.md
+
6
-
1
View file @
f08222fa
...
...
@@ -60,9 +60,14 @@ For windows users, download the latest archive from the [release page](https://g
While convenient, creating pod before debugging can be time consuming. You can install the debug agent DaemonSet in advance to skip this:
```
bash
# if your kubernetes version is v1.16 or newer
kubectl apply
-f
https://raw.githubusercontent.com/aylei/kubectl-debug/master/scripts/agent_daemonset.yml
# if your kubernetes is old version(<v1.16), you should change the apiVersion to extensions/v1beta1, As follows
wget https://raw.githubusercontent.com/aylei/kubectl-debug/master/scripts/agent_daemonset.yml
sed
-i
''
'1s/apps\/v1/extensions\/v1beta1/g'
agent_daemonset.yml
kubectl apply
-f
agent_daemonset.yml
# or using helm
helm
install
-n
=
debug-agent ./contrib/helm/kubectl-debug
helm
install
kubectl-debug
-n
=
debug-agent ./contrib/helm/kubectl-debug
```
## Debug instructions
...
...
This diff is collapsed.
Click to expand it.
contrib/helm/kubectl-debug/templates/agent-ds.yaml
+
4
-
0
View file @
f08222fa
{{
- if ge .Capabilities.KubeVersion.Minor "16"
}}
apiVersion
:
apps/v1
{{
- else
}}
apiVersion
:
extensions/v1beta1
{{
- end
}}
kind
:
DaemonSet
metadata
:
name
:
{{
template "kubectl-debug.fullname" .
}}
-agent
...
...
This diff is collapsed.
Click to expand it.
docs/zh-cn.md
+
7
-
2
View file @
f08222fa
...
...
@@ -58,9 +58,14 @@ Windows 用户可以从 [release page](https://github.com/aylei/kubectl-debug/re
`agentless`
虽然方便, 但会让 debug 的启动速度显著下降, 你可以通过预先安装 debug-agent 的 DaemonSet 来使用 agent 模式, 加快启动速度:
```
bash
# 如果你的kubernetes版本为v1.16或更高
kubectl apply
-f
https://raw.githubusercontent.com/aylei/kubectl-debug/master/scripts/agent_daemonset.yml
# 或者使用 helm 安装
helm
install
-n
=
debug-agent ./contrib/helm/kubectl-debug
# 如果你使用的是旧版本的kubernetes(<v1.16), 你需要先将apiVersion修改为extensions/v1beta1, 可以如下操作
wget https://raw.githubusercontent.com/aylei/kubectl-debug/master/scripts/agent_daemonset.yml
sed
-i
''
'1s/apps\/v1/extensions\/v1beta1/g'
agent_daemonset.yml
kubectl apply
-f
agent_daemonset.yml
# 或者使用helm安装
helm
install
kubectl-debug
-n
=
debug-agent ./contrib/helm/kubectl-debug
```
简单使用:
...
...
This diff is collapsed.
Click to expand it.
scripts/agent_daemonset.yml
+
1
-
1
View file @
f08222fa
apiVersion
:
extensions/v1beta
1
apiVersion
:
apps/v
1
kind
:
DaemonSet
metadata
:
labels
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment