Search code examples
kuberneteskubernetes-helmpublish-subscribek3skubernetes-operator

Kubernetes Operator Vs Helm for Pub-Sub Model application


I have a Publisher Subscriber (Pub-Sub model) application in C# and I want to host it on Kubernetes for high availability. Is it good to go with helm or shall I use operators in my application. What is best suited for Pub-Sub model applications ?


Solution

  • If you have a (dockerized) application and you want to run it in Kubernetes, then it's enough if you create Kubernetes Deployment configuration.

    So the simplest thing you can do is to create a file deployment.yaml with the following content.

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: my-deployment
      labels:
        app: my-app
    spec:
      replicas: 3
      selector:
        matchLabels:
          app: my-app
      template:
        metadata:
          labels:
            app: my-app
        spec:
          containers:
          - name: my-app
            image: <your-docker-image>
    

    And then deploy it in Kubernetes with the following command.

    kubectl apply -f deployment.yaml
    

    About Helm and Operators, you generally use them for some more complex deployments, to organize and template multiple Kubernetes configurations, to interact with your application, to perform backups, and more operational tasks.