15 lines
1.1 KiB
YAML
15 lines
1.1 KiB
YAML
plugins:
|
|
start-alpine-pod:
|
|
shortCut: Ctrl-T
|
|
confirm: true
|
|
description: "Start an alpine:latest pod in current context/namespace"
|
|
scopes:
|
|
- pods
|
|
- deployments
|
|
command: bash
|
|
background: true
|
|
args:
|
|
- -c
|
|
- |
|
|
echo '{"apiVersion": "apps/v1", "kind": "Deployment", "metadata": {"name": "alpine", "labels": {"app": "alpine", "debug": "1"}}, "spec": {"selector": {"matchLabels": {"app": "alpine"}}, "replicas": 1, "template": {"metadata": {"labels": {"app": "alpine", "debug": "1"}, "annotations": {"kubectl.kubernetes.io/default-container": "alpine"}}, "spec": {"containers": [{"name": "alpine", "image": "alpine:latest", "imagePullPolicy": "Always", "securityContext": {"runAsUser": 0, "runAsGroup": 0}, "stdin": true, "tty": true, "stdinOnce": true, "terminationMessagePath": "/dev/termination-log", "terminationMessagePolicy": "File", "resources": {"requests": {"cpu": "100m", "memory": "100Mi"}, "limits": {"cpu": "100m", "memory": "100Mi"}}}], "restartPolicy": "Always"}}}}' | kubectl apply -f - --context $CONTEXT --namespace $NAMESPACE
|