From 2312f12b155ada38f1523806379a8bbe599b3dad Mon Sep 17 00:00:00 2001 From: Boshi Lian Date: Sat, 7 Jan 2023 07:52:51 -0800 Subject: [PATCH] Update README.md --- plugin/kubernetes/README.md | 40 +++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/plugin/kubernetes/README.md b/plugin/kubernetes/README.md index cf10605a..570090d9 100644 --- a/plugin/kubernetes/README.md +++ b/plugin/kubernetes/README.md @@ -8,7 +8,20 @@ this plugin is inpsired by the [first version kubernetes plugin](https://github. Start plugin with flag `--all-namespaces` or environment variable `SSHPIPERD_KUBERNETES_ALL_NAMESPACES=true` for cluster-wide usage, or it will listen to the namespace where it is in by default. -### Apply CRD definition +### Helm + +[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/sshpiper)](https://artifacthub.io/packages/helm/sshpiper/sshpiper) + + +``` +helm repo add sshpiper https://tg123.github.io/sshpiper-chart/ + +helm install my-sshpiper sshpiper/sshpiper --version 0.1.1 +``` + +### Manually + +#### Apply CRD definition ``` kubectl apply -f https://raw.githubusercontent.com/tg123/sshpiper/master/plugin/kubernetes/crd.yaml @@ -18,7 +31,7 @@ most parameters are the same as in [yaml](../yaml/) A full sample can be found [here](sample.yaml) -### Create Service +#### Create Service ``` # sshpiper service @@ -114,7 +127,10 @@ metadata: name: sshpiper-account ``` -### Create Password Pipe +### Create Pipes + +#### Create Password Pipe + ``` apiVersion: sshpiper.com/v1beta1 @@ -130,25 +146,28 @@ spec: ignore_hostkey: true ``` -### Create Public Key Pipe +`ssh password_simple@piper_ip` will pipe to `user@host-password` + + +#### Create Public Key Pipe + +`ssh piper_ip -i ` will pipe to `user@host-publickey` and login with secret `host-publickey-key` + ``` ---- apiVersion: v1 data: - privatekey: | + ssh-privatekey: | kind: Secret metadata: name: host-publickey-key -type: Opaque +type: kubernetes.io/ssh-auth --- apiVersion: sshpiper.com/v1beta1 kind: Pipe metadata: name: pipe-publickey - annotations: - privatekey_field_name: privatekey # this is optional, default is privatekey spec: from: - username: ".*" # catch all @@ -160,5 +179,4 @@ spec: private_key_secret: name: host-publickey-key ignore_hostkey: true ---- -``` \ No newline at end of file +```