-
-
Save tsal/f6a21e694224d54623b00ac18b1c46e6 to your computer and use it in GitHub Desktop.
kubernetes pod example for atmoz/sftp
This file contains hidden or 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
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: sftp | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: sftp | |
namespace: sftp | |
labels: | |
environment: production | |
spec: | |
type: "LoadBalancer" | |
ports: | |
- name: "ssh" | |
port: 22 | |
targetPort: 22 | |
selector: | |
app: sftp | |
status: | |
loadBalancer: {} | |
--- | |
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: sftp | |
namespace: sftp | |
labels: | |
environment: environment: production | |
app: sftp | |
spec: | |
# how many pods and indicate which strategy we want for rolling update | |
replicas: 1 | |
minReadySeconds: 10 | |
template: | |
metadata: | |
labels: | |
environment: production | |
app: sftp | |
annotations: | |
container.apparmor.security.beta.kubernetes.io/sftp: runtime/default | |
spec: | |
#secrets and config | |
volumes: | |
- name: sftp-public-keys | |
configMap: | |
name: sftp-public-keys | |
containers: | |
#the sftp server itself | |
- name: sftp | |
image: atmoz/sftp:latest | |
imagePullPolicy: Always | |
env: | |
# - name: PASSWORD | |
# valueFrom: | |
# secretKeyRef: | |
# name: sftp-server-sec | |
# key: password | |
args: ["myUser::1001:100:incoming,outgoing"] #create users and dirs | |
ports: | |
- containerPort: 22 | |
volumeMounts: | |
- mountPath: /home/myUser/.ssh/keys | |
name: sftp-public-keys | |
readOnly: true | |
securityContext: | |
capabilities: | |
add: ["SYS_ADMIN"] | |
resources: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.portworx.com/portworx-install-with-kubernetes/storage-operations/create-pvcs/create-shared-pvcs/