Giter Site home page Giter Site logo

osinfra-io / gke-info-go Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 75 KB

An example Go application that shows information about the Google Kubernetes Engine (GKE) cluster.

Home Page: https://www.osinfra.io

License: GNU General Public License v2.0

Dockerfile 4.67% Go 40.08% HCL 55.26%
google-cloud-platform infrastructure-as-code kubernetes osinfra platform-team terraform

gke-info-go's Introduction

GKE Info Go

An example Go application that shows information about the Google Kubernetes Engine (GKE) cluster.

Usage

---
apiVersion: v1
kind: Namespace

metadata:
  name: gke-info

---
apiVersion: apps/v1
kind: Deployment

metadata:
  name: gke-info-go
  namespace: gke-info

spec:
  replicas: 1
  selector:
    matchLabels:
      app: gke-info-go

  template:
    metadata:
      labels:
        app: gke-info-go

    spec:
      containers:
        - image: ghcr.io/osinfra-io/gke-info-go:latest
          imagePullPolicy: Always
          name: gke-info-go

          ports:
            - containerPort: 8080

          resources:
            limits:
              cpu: "50m"
              memory: "128Mi"
            requests:
              cpu: "25m"
              memory: "64Mi"

---
apiVersion: v1
kind: Service

metadata:
  name: gke-info-go
  namespace: gke-info

  labels:
    app: gke-info-go

spec:
  ports:
    - name: http
      port: 8080
      targetPort: 8080

  selector:
    app: gke-info-go

After deploying, you can get the information about the GKE cluster by running the following command:

kubectl port-forward --namespace gke-info $(kubectl get pod --namespace gke-info --selector="app=gke-info-go" --output jsonpath='{.items[0].metadata.name}') 8080:8080

Curl the endpoint:

curl http://localhost:8080/gke-info

gke-info-go's People

Contributors

brettcurtis avatar dependabot[bot] avatar osinfra-sa avatar

gke-info-go's Issues

Configure Datadog APM

Datadog’s source code integration connects your telemetry to your Git repositories, whether they’re hosted in GitHub, GitLab, Bitbucket, or Azure DevOps. Once you’ve enabled the integration, you can debug stack traces, slow profiles, and other issues by quickly accessing the relevant lines of code in your repository.

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.