Skip to content

Instantly share code, notes, and snippets.

@dineshtripathi30
Created July 10, 2021 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dineshtripathi30/c66021e868312c42ac33c3c76d91791c to your computer and use it in GitHub Desktop.
Save dineshtripathi30/c66021e868312c42ac33c3c76d91791c to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: jumpbox
namespace: YOUR-NAMESPACE #update the namespace here where your Tanzu Kubernetes cluster is deployed
spec:
containers:
- image: "photon:3.0"
name: jumpbox
command: [ "/bin/bash", "-c", "--" ]
args: [ "yum install -y openssh-server; mkdir /root/.ssh; cp /root/ssh/ssh-privatekey /root/.ssh/id_rsa; chmod 600 /root/.ssh/id_rsa; while true; do sleep 30; done;" ]
volumeMounts:
- mountPath: "/root/ssh"
name: ssh-key
readOnly: true
resources:
requests:
memory: 2Gi
volumes:
- name: ssh-key
secret:
secretName: YOUR-CLUSTER-NAME-ssh #replace the name of secret here that you copied
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment