Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created June 20, 2020 15:55
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 gdyrrahitis/9bcc8103ea1b21755922745a24d0616f to your computer and use it in GitHub Desktop.
Save gdyrrahitis/9bcc8103ea1b21755922745a24d0616f to your computer and use it in GitHub Desktop.
k8s sftp pod
apiVersion: v1
kind: Pod
metadata:
name: sftp
labels:
app: sftp-server
spec:
containers:
- name: sftp-server-demo
image: atmoz/sftp
args: ["foo:pass:1001"]
ports:
- containerPort: 22
@gdyrrahitis
Copy link
Author

gdyrrahitis commented Jun 20, 2020

kubectl apply -f ubuntu-pod.yml
kubectl apply -f sftp-pod.yml
kubectl apply -f sftp-service.yml

Ubuntu pod - Terminal

$ apt update

$ apt-get install openssh-server

kubectl get services # locate sftp-service cluster IP

In terminal

sftp foo@<cluster-ip>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment