Skip to content

Init Container for probing dependant services in Kubernetes

License

Notifications You must be signed in to change notification settings

jamesdube/init-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

init-c

Init Container for probing dependant services in Kubernetes

Issues Docker Pulls Docker Image Version (latest by date) Docker Image Size (latest by date)

About

In certain use cases you would want to delay starting up your deployment by checking if dependent services are up either through http or tcp probing. This helps your services to boot up in the correct order, for reference check out this example. Particular use cases include service discovery and fetching startup configs for spring boot applications.

Features

  • HTTP probe
  • TCP Probe
  • DNS Probe

Usage

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend
  namespace: default
  labels:
    app: frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: frontend
  template:
    metadata:
      labels:
        app: frontend
    spec:
      # Add your init container here            
      initContainers:
      - name: init-c
        image: jdube/init-c
        args: ['http', '-u', "http://backend.default"]
      containers:
      - name: frontend
        image: jdube/frontend
        ports:
        - containerPort: 8000

Local Testing

docker run --rm jdube/init-c http -u https://www.google.com

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

About

Init Container for probing dependant services in Kubernetes

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published