-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: release-krew | ||
on: | ||
release: | ||
types: ["published"] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Open PR for new release of Krew Plugin | ||
uses: rajatjindal/krew-plugin-release@v0.0.30 | ||
with: | ||
plugin-name: 'pexec' | ||
upstream-krew-index-owner: 'kubernetes-sigs' | ||
env: | ||
KREW_PLUGIN_RELEASE_TOKEN: ${{ secrets.KREW_PLUGIN_RELEASE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
apiVersion: krew.googlecontainertools.github.com/v1alpha2 | ||
kind: Plugin | ||
metadata: | ||
name: pexec | ||
spec: | ||
homepage: https://github.com/ssup2/kpexec | ||
shortDescription: Execute process with privileges in a pod | ||
description: | | ||
pexec is a kubernetes cli that runs commands in a container with high | ||
privileges. It runs a highly privileged container on the same node as | ||
the target container and joins into the namespaces of the target container | ||
(IPC, UTS, PID, net, mount). This is useful for debugging where you often | ||
need to execute commands with high privileges. Also, pexec has a tools | ||
mode, which adds useful debugging tools into the debugged container. The | ||
tools mode is useful when there necessary debugging tools are missing in the | ||
target container. | ||
In contrast, kubectl-exec runs the command with the same privileges as the | ||
container. For example, if a container does not have network privileges, | ||
the command executed by kubectl-exec also has no network privileges. | ||
This makes debugging the pod difficult. If you use pexec instead | ||
of kubectl-exec, you can easily get high privileges for debugging. | ||
caveats: | | ||
pexec requires the privileges to run privileged pods with hostPID. | ||
version: "{{ .TagName }}" | ||
platforms: | ||
- bin: kubectl-pexec | ||
{{addURIAndSha "https://github.com/github.com/ssup2/kpexec/releases/download/{{ .TagName }}/kubectl_pexec_{{ .TagName }}_Linux_amd64.tar.gz" .TagName }} | ||
selector: | ||
matchLabels: | ||
os: linux | ||
arch: amd64 | ||
- bin: kubectl-pexec | ||
{{addURIAndSha "https://github.com/github.com/ssup2/kpexec/releases/download/{{ .TagName }}/kubectl_pexec_{{ .TagName }}_Linux_arm64.tar.gz" .TagName }} | ||
selector: | ||
matchLabels: | ||
os: linux | ||
arch: arm64 | ||
- bin: kubectl-pexec | ||
{{addURIAndSha "https://github.com/github.com/ssup2/kpexec/releases/download/{{ .TagName }}/kubectl_pexec_{{ .TagName }}_Darwin_amd64.tar.gz" .TagName }} | ||
selector: | ||
matchLabels: | ||
os: darwin | ||
arch: amd64 | ||
- bin: kubectl-pexec | ||
{{addURIAndSha "https://github.com/github.com/ssup2/kpexec/releases/download/{{ .TagName }}/kubectl_pexec_{{ .TagName }}_Darwin_arm64.tar.gz" .TagName }} | ||
selector: | ||
matchLabels: | ||
os: darwin | ||
arch: arm64 | ||
- bin: kubectl-pexec.exe | ||
{{addURIAndSha "https://github.com/github.com/ssup2/kpexec/releases/download/{{ .TagName }}/kubectl_pexec_{{ .TagName }}_Windows_amd64.tar.gz" .TagName }} | ||
selector: | ||
matchLabels: | ||
os: windows | ||
arch: amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters