All Projects β†’ CATechnologiesTest β†’ Kubeiql

CATechnologiesTest / Kubeiql

Licence: apache-2.0
A GraphQL interface for Kubernetes.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Kubeiql

Gest
πŸ‘¨β€πŸ’» A sensible GraphQL testing tool - test your GraphQL schema locally and in the cloud
Stars: ✭ 109 (-2.68%)
Mutual labels:  graphql
Graphql Fhir
A secure GraphQL implementation for the HL7 FHIR specification based on the current implementation guide for GraphQL with FHIR and developed with Node.js and Express.
Stars: ✭ 110 (-1.79%)
Mutual labels:  graphql
Sapper Firebase Typescript Graphql Tailwindcss Actions Template
A template that includes Sapper for Svelte, Firebase functions and hosting, TypeScript and TypeGraphQL, Tailwind CSS, ESLint, and automatic building and deployment with GitHub Actions
Stars: ✭ 111 (-0.89%)
Mutual labels:  graphql
Thorium
Platform for starship simulator controls
Stars: ✭ 109 (-2.68%)
Mutual labels:  graphql
Json Serverless
Transform a JSON file into a serverless REST API in AWS cloud
Stars: ✭ 108 (-3.57%)
Mutual labels:  graphql
Laqul
A complete starter kit that allows you create amazing apps that look native thanks to the Quasar Framework. Powered by an API developed in Laravel Framework using the easy GraphQL queries language. And ready to use the Google Firebase features.
Stars: ✭ 110 (-1.79%)
Mutual labels:  graphql
Flask Graphene Sqlalchemy
βš—οΈProject template to build a GraphQL API in Python
Stars: ✭ 109 (-2.68%)
Mutual labels:  graphql
K8s Gitops
Kubernetes cluster managed by GitOps - Git as a single source of truth, automated pipelines, declarative everything, next-generation DevOps
Stars: ✭ 110 (-1.79%)
Mutual labels:  kubernetes-cluster
Formql
FormQL - A framework for building dynamic forms in Angular
Stars: ✭ 110 (-1.79%)
Mutual labels:  graphql
Next
Directus is a real-time API and App dashboard for managing SQL database content. 🐰
Stars: ✭ 111 (-0.89%)
Mutual labels:  graphql
Apollo Link
πŸ”— Interface for fetching and modifying control flow of GraphQL requests
Stars: ✭ 1,434 (+1180.36%)
Mutual labels:  graphql
Persianjsonplaceholder
Persian fake REST/GraphQL API for testing and prototyping.
Stars: ✭ 110 (-1.79%)
Mutual labels:  graphql
Create Apollo App
Create Apollo App is a command-line tool designed to generate fully-configured starter Apollo GraphQL projects with essential dependencies for developing web, server and mobile applications and zero build configuration.
Stars: ✭ 110 (-1.79%)
Mutual labels:  graphql
Gql
Stars: ✭ 109 (-2.68%)
Mutual labels:  graphql
Nestjs Example
NestJS example with GraphQL, Schema-Stitching, Dataloader, GraphQL Upload, RabbitMQ, Redis, Scalable Websocket and JWT authentication
Stars: ✭ 111 (-0.89%)
Mutual labels:  graphql
Graphql Pundit
Pundit authorization helpers for the GraphQL Ruby gem
Stars: ✭ 109 (-2.68%)
Mutual labels:  graphql
Aws Serverless Appsync Loyalty
Unicorn Loyalty: E-Commerce Serverless GraphQL Loyalty Sample App
Stars: ✭ 110 (-1.79%)
Mutual labels:  graphql
Pragma
Build GraphQL APIs In No Time
Stars: ✭ 111 (-0.89%)
Mutual labels:  graphql
Nestjs Graphql
nest-js starter which implement graphql module
Stars: ✭ 111 (-0.89%)
Mutual labels:  graphql
Qlens
QLens is an electron app which dynamically generates GraphQL Schemas and Mongo Schema visualization. QLens significantly cuts development time by automating the formation of their GraphQL schemas based on information fetched from their non-relational database.
Stars: ✭ 110 (-1.79%)
Mutual labels:  graphql

Repository Status

This repository exists here for historical purposes. The active repo is now hosted at: https://github.com/yipeeio/kubeiql

Kubeiql

A GraphQL interface for Kubernetes.

The goal of this project is to provide an alternative GraphQL interface to a Kubernetes cluster. It is not intended to entirely replace the ReST APIs as some of them (particularly the watch APIs) don't map well onto GraphQL.

Yipee.io is a CA, Inc. Accelerator project.

Current Status

pre-alpha

  • Queries are currently supported against Pods, Deployments, ReplicaSets, StatefulSets, and DaemonSets.
  • No mutations are yet implemented.
  • The retrieval of data from the cluster is accomplished via watchers on the kubernetes API. By default, we expect to access the API at localhost port 8080 (run "kubectl proxy --port=8080")
    • to access a kubernetes API without using the proxy, you can set environment variables:
      • API_HOST: host/port of API, e.g., https://kubernetes.default.svc from inside a cluster
      • API_SECRET_PATH: directory containing files 'ca.crt' and 'token', e.g. /var/run/secrets/kubernetes.io/serviceaccount from a pod inside a cluster
  • Tests are lacking
  • See https://hub.docker.com/r/yipeeio/kubeiql/ for a docker image

Getting Started

To experiment with the API:

  1. Download the code
  2. Type sh gobuild.sh
  3. Start a proxy for the kubernetes API on port 8080 (e.g., kubectl proxy --port=8080)
  4. Run ./kubeiql

The server runs at port 8128. You can use curl to play with it as shown in the examples below via the /query endpoint, or point your browser at 'localhost:8128/' and experiment with the GraphiQL tool (much more user-friendly).

Build an image

If you're running on a non-linux machine, use the elf-build.sh script to build an image suitable for use in a docker container. Then just build in the usual way:

docker build -t your-image-name .

Running inside a Kubernetes cluster

To run kubeiql inside a cluster, simply apply the k8sdeploy.yaml file:

kubectl apply -f k8sdeploy.yaml

Examples

The query:

{
  daemonSetByName(namespace: "kube-system", name: "kube-proxy") {
    metadata {name namespace labels {name value}}
  }
}
curl -X POST -H"Content-Type: application/json" http://localhost:8128/query -d '{ "query": "{daemonSetByName(namespace: \"kube-system\", name: \"kube-proxy\") { metadata {name namespace labels {name value}} pods {metadata {name}}}}"}'

returns:

{
  "data": {
    "daemonSetByName": {
      "metadata": {
        "name": "kube-proxy",
        "namespace": "kube-system",
        "labels": [
          {
            "name": "k8s-app",
            "value": "kube-proxy"
          }
        ]
      },
      "pods": [
        {
          "metadata": {
            "name": "kube-proxy-7vhx5"
          }
        }
      ]
    }
  }
}

and the query:

{
  allPods() {
    owner {kind metadata {name}}
    rootOwner { kind metadata { name namespace }
      ... on StatefulSet {
        metadata { name }
      }
      ... on Deployment {
        replicaSets {
            metadata { name }
          pods { metadata { name } } }
      }
    }
  }
}
curl -X POST -H"Content-Type: application/json" http://localhost:8128/query -d '{"query": "{allPods() {owner {kind metadata {name}} rootOwner { kind metadata { name namespace } ... on StatefulSet { metadata { name } } ... on Deployment { replicaSets { metadata { name } pods { metadata { name } } } } } } }" }'

returns:

{
  "data": {
    "allPods": [
      {
        "owner": {
          "kind": "ReplicaSet",
          "metadata": {
            "name": "backend-549447ccf"
          }
        },
        "rootOwner": {
          "kind": "Deployment",
          "metadata": {
            "name": "backend",
            "namespace": "default"
          },
          "replicaSets": [
            {
              "metadata": {
                "name": "backend-549447ccf"
              },
              "pods": [
                {
                  "metadata": {
                    "name": "backend-549447ccf-4zphf"
                  }
                },
                {
                  "metadata": {
                    "name": "clunky-sabertooth-joomla-5d4ddc985d-fpddz"
                  }
                },
                {
                  "metadata": {
                    "name": "clunky-sabertooth-mariadb-0"
                  }
                }
                // ...
              ]
            }
          ]
        }
      },
      {
        "owner": {
          "kind": "ReplicaSet",
          "metadata": {
            "name": "clunky-sabertooth-joomla-5d4ddc985d"
          }
        },
        "rootOwner": {
          "kind": "Deployment",
          "metadata": {
            "name": "clunky-sabertooth-joomla",
            "namespace": "default"
          },
          "replicaSets": [
            {
              "metadata": {
                "name": "backend-549447ccf"
              },
              "pods": [
                {
                  "metadata": {
                    "name": "backend-549447ccf-4zphf"
                  }
                },
                {
                  "metadata": {
                    "name": "clunky-sabertooth-joomla-5d4ddc985d-fpddz"
                  }
                }
                //...
              ]
            }
          ]
        }
      },
      {
        "owner": {
          "kind": "StatefulSet",
          "metadata": {
            "name": "clunky-sabertooth-mariadb"
          }
        },
        "rootOwner": {
          "kind": "StatefulSet",
          "metadata": {
            "name": "clunky-sabertooth-mariadb",
            "namespace": "default"
          }
        }
      },
      {
        "owner": {
          "kind": "ReplicaSet",
          "metadata": {
            "name": "ui-9c6c8d79"
          }
        },
        "rootOwner": {
          "kind": "Deployment",
          "metadata": {
            "name": "ui",
            "namespace": "default"
          },
          "replicaSets": [
            {
              "metadata": {
                "name": "backend-549447ccf"
              },
              "pods": [
                {
                  "metadata": {
                    "name": "backend-549447ccf-4zphf"
                  }
                },
                {
                  "metadata": {
                    "name": "clunky-sabertooth-joomla-5d4ddc985d-fpddz"
                  }
                }
                // ...
              ]
            }
          ]
        }
      },
      {
        "owner": {
          "kind": "ReplicaSet",
          "metadata": {
            "name": "ui-9c6c8d79"
          }
        },
        "rootOwner": {
          "kind": "Deployment",
          "metadata": {
            "name": "ui",
            "namespace": "default"
          },
          "replicaSets": [
            {
              "metadata": {
                "name": "backend-549447ccf"
              },
              "pods": [
                {
                  "metadata": {
                    "name": "backend-549447ccf-4zphf"
                  }
                },
                {
                  "metadata": {
                    "name": "clunky-sabertooth-joomla-5d4ddc985d-fpddz"
                  }
                }
                // ...
              ]
            }
          ]
        }
      },
      {
        "owner": {
          "kind": "Pod",
          "metadata": {
            "name": "etcd-minikube"
          }
        },
        "rootOwner": {
          "kind": "Pod",
          "metadata": {
            "name": "etcd-minikube",
            "namespace": "kube-system"
          }
        }
      },
      {
        "owner": {
          "kind": "Pod",
          "metadata": {
            "name": "kube-addon-manager-minikube"
          }
        },
        "rootOwner": {
          "kind": "Pod",
          "metadata": {
            "name": "kube-addon-manager-minikube",
            "namespace": "kube-system"
          }
        }
      },
      {
        "owner": {
          "kind": "Pod",
          "metadata": {
            "name": "kube-apiserver-minikube"
          }
        },
        "rootOwner": {
          "kind": "Pod",
          "metadata": {
            "name": "kube-apiserver-minikube",
            "namespace": "kube-system"
          }
        }
      },
      {
        "owner": {
          "kind": "Pod",
          "metadata": {
            "name": "kube-controller-manager-minikube"
          }
        },
        "rootOwner": {
          "kind": "Pod",
          "metadata": {
            "name": "kube-controller-manager-minikube",
            "namespace": "kube-system"
          }
        }
      },
      {
        "owner": {
          "kind": "ReplicaSet",
          "metadata": {
            "name": "kube-dns-86f4d74b45"
          }
        },
        "rootOwner": {
          "kind": "Deployment",
          "metadata": {
            "name": "kube-dns",
            "namespace": "kube-system"
          },
          "replicaSets": [
            {
              "metadata": {
                "name": "backend-549447ccf"
              },
              "pods": [
                {
                  "metadata": {
                    "name": "backend-549447ccf-4zphf"
                  }
                },
                {
                  "metadata": {
                    "name": "clunky-sabertooth-joomla-5d4ddc985d-fpddz"
                  }
                }
                // ...
              ]
            }
          ]
        }
      },
      {
        "owner": {
          "kind": "DaemonSet",
          "metadata": {
            "name": "kube-proxy"
          }
        },
        "rootOwner": {
          "kind": "DaemonSet",
          "metadata": {
            "name": "kube-proxy",
            "namespace": "kube-system"
          }
        }
      },
      {
        "owner": {
          "kind": "Pod",
          "metadata": {
            "name": "kube-scheduler-minikube"
          }
        },
        "rootOwner": {
          "kind": "Pod",
          "metadata": {
            "name": "kube-scheduler-minikube",
            "namespace": "kube-system"
          }
        }
      }
      // ...
    ]
  }
}

License

The work done has been licensed under Apache License 2.0. The license file can be found here. You can find out more about the license at www.apache.org/licenses/LICENSE-2.0.

Questions?

Feel free to contact us.

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].