All Projects → samba-in-kubernetes → samba-operator

samba-in-kubernetes / samba-operator

Licence: Apache-2.0 License
An operator for a Samba as a service on PVCs in kubernetes

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to samba-operator

namespace-provisioner
A Kubernetes operator creating K8s resources by annotating namespaces
Stars: ✭ 52 (+116.67%)
Mutual labels:  operator
ucsunivention
⚫ Curso GRÁTIS SAMBA-4 UCS Univention Core Free 5.x Domain Controller Active Directory Open Source
Stars: ✭ 29 (+20.83%)
Mutual labels:  samba
cockpit-samba-manager
A Cockpit plugin to manage Samba shares and users.
Stars: ✭ 28 (+16.67%)
Mutual labels:  samba
ibm-spectrum-scale-csi
The IBM Spectrum Scale Container Storage Interface (CSI) project enables container orchestrators, such as Kubernetes and OpenShift, to manage the life-cycle of persistent storage.
Stars: ✭ 41 (+70.83%)
Mutual labels:  operator
vmq-operator
VerneMQ Operator creates/configures/manages VerneMQ clusters atop Kubernetes
Stars: ✭ 27 (+12.5%)
Mutual labels:  operator
skywalking-swck
Apache SkyWalking Cloud on Kubernetes
Stars: ✭ 62 (+158.33%)
Mutual labels:  operator
loki-operator
viaq.github.io/loki-operator/
Stars: ✭ 30 (+25%)
Mutual labels:  operator
litmus-helm
Helm Charts for the Litmus Chaos Operator & CRDs
Stars: ✭ 23 (-4.17%)
Mutual labels:  operator
radondb-clickhouse-kubernetes
Open Source,High Availability Cluster,based on ClickHouse
Stars: ✭ 54 (+125%)
Mutual labels:  operator
mysql-operator
A Kubernetes Operator for MySQL Community Server
Stars: ✭ 21 (-12.5%)
Mutual labels:  operator
terraform-operator
A Kubernetes CRD to handle terraform operations
Stars: ✭ 204 (+750%)
Mutual labels:  operator
wildfly-operator
Kubernetes Operator for WildFly
Stars: ✭ 28 (+16.67%)
Mutual labels:  operator
elastalert-operator
The Elastalert Operator is an implementation of a Kubernetes Operator, to easily integrate elastalert with gitops.
Stars: ✭ 18 (-25%)
Mutual labels:  operator
openshift-disconnected-operators
No description or website provided.
Stars: ✭ 52 (+116.67%)
Mutual labels:  operator
cnat
Example Kubernetes controller: the cloud native at command
Stars: ✭ 147 (+512.5%)
Mutual labels:  operator
grafana-operator
An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
Stars: ✭ 449 (+1770.83%)
Mutual labels:  operator
horusec-platform
Horusec Platform is a set of web services that integrate with the Horusec CLI to facilitate the visualization and management of found vulnerabilities.
Stars: ✭ 32 (+33.33%)
Mutual labels:  operator
provider-argocd
Crossplane provider to provision and manage ArgoCD objects
Stars: ✭ 23 (-4.17%)
Mutual labels:  operator
chaos-operator
chaos engineering via kubernetes operator
Stars: ✭ 90 (+275%)
Mutual labels:  operator
speedcopy
Patched python shutil.copyfile to allow faster speeds on samba shares.
Stars: ✭ 13 (-45.83%)
Mutual labels:  samba

Samba Operator

An operator for Samba as a service on PVCs in kubernetes.

Description

This project implements the samba-operator. It it responsible for the the SmbShare, SmbSecurityConfig, and SmbCommonConfig custom resources:

  • SmbShare describes an SMB Share that will be used to share data with clients.
  • SmbSecurityConfig describes domain and/or user based security properties for one or more shares
  • SmbCommonConfig describes general configuration properties for smb shares

Trying it out (Quick Start)

Prerequisites

You need to have a kubernetes cluster running. For example, minikube is sufficient.

If you wish to use Active Directory domain based security you need one or more domain controllers that are visible to Pods within the Kubernetes cluster.

If you wish to access shares from outside the Kubernetes cluster your cluster must support Services with type LoadBalancer.

Start the operator

In order to install the CRDs, other resources, and start the operator, invoke:

make deploy

To use your own image, use:

make deploy IMG=<my-registry/and/image:tag>

To delete the operator and CRDs from the cluster, run:

make delete-deploy

Creating new Shares

Use a PVC you define

A share can be created that uses pre-existing PVCs, ones that are not directly managed by the operator.

Assuming you have a PVC named mypvc, you can create a new SmbShare using the example YAML below:

apiVersion: samba-operator.samba.org/v1alpha1
kind: SmbShare
metadata:
  name: smbshare1
spec:
  storage:
    pvc:
      name: "mypvc"
  readOnly: false

Use a PVC embedded in the SmbShare

A share can be created that embeds a PVC definition. In this case the operator will automatically manage the PVC along with the share. This example assumes you have a default storage class enabled.

For example:

apiVersion: samba-operator.samba.org/v1alpha1
kind: SmbShare
metadata:
  name: smbshare2
spec:
  storage:
    pvc:
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi
  readOnly: false

Testing it with a Local Connection

Assuming a local Linux-based environment you can test out a connection to the container by forwarding the SMB port and using a local install of smbclient to access the share:

$ kubectl get pods              NAME                              READY
STATUS    RESTARTS   AGE
my-smbservice-7f779ddc8c-nb6k6    1/1     Running   0          62m
samba-operator-5758b4dbbf-gk9pk   1/1     Running   0          70m
$ kubectl port-forward pod/my-smbservice-7f779ddc8c-nb6k6  4455:445
Forwarding from 127.0.0.1:4455 -> 445
Forwarding from [::1]:4455 -> 445
Handling connection for 4455
$ smbclient -p 4455 -U sambauser //localhost/share
Enter SAMBA\sambauser's password:
Try "help" to get a list of possible commands.
smb: \> ls
.                                   D        0  Fri Aug 28 14:43:26 2020
..                                  D        0  Fri Aug 28 14:32:53 2020
x                                   A   359386  Fri Aug 28 14:35:18 2020
gefcanilant                         A  5141264  Fri Aug 28 14:43:26 2020

4184064 blocks of size 1024. 4141292 blocks available
smb: \>

Above we forward the normal SMB port to an unprivileged local port, assuming you'll be running this as a normal user.

Documentation

For additional details on how to set up shares that can authenticate via Active Directory, or use a load balancer, etc please refer to the Samba Operator Documentation.

Containers on quay.io

This operator uses the container built from samba-in-kubernetes/samba-container as found on quay.io.

The container from this codebase is published on quay.io too.

Additional Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].