Git Product home page Git Product logo

Comments (1)

LamaAni avatar LamaAni commented on June 23, 2024 1

The would probably mean that the user running withing the pod (E.g. the helm chart user) dose not have permissions to access the resources and create new jobs/pods/etc resources. This is a result of the helm chart user attempting to access the Kubernetes cluster api (rest api, in this case) from within the executing worker pod.

The error comes from withing the helm chart and is best address there.

The solution is to create a role that allows the required permissions, and is apply it to the airflow user (see above) in the executing namespace. I also do believe the helm chart has the option to change the airflow user Kubernetes permissions, but was unable to find the exect config. You can search it here

To test, you can install/download the kubectl cli into your running worker pod and try to execute commands with the cli. e.g. kubectl get pods or kubectl run... for example.

kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: airflow-extra-permissions
rules:
  - apiGroups:
      - ""
      - "apps"
      - "batch"
    resources:
      - endpoints
      - deployments
      - pods
      - jobs
    verbs:
      - *

kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: airflow-extra-permissions
  namespace: [the namespace where you are running]
subjects:
  - kind: ServiceAccount
    name: airflow-worker
    namespace: [the namespace where you are running]
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: airflow-extra-permissions

from kubernetesjoboperator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.