Skip to content

levaitamas/hello-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello-node

A minimal webserver that returns the hostname. Useful for teaching and debugging K8s networking.

Available as:

Usage examples

  1. Create a deployment and a LoadBalancer service:
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: hello
  name: hello
spec:
  replicas: 2
  selector:
    matchLabels:
      app: hello
  template:
    metadata:
      labels:
        app: hello
    spec:
      containers:
      - name: hello
        image: ghcr.io/levaitamas/hello-node
---
apiVersion: v1
kind: Service
metadata:
  name: hello
spec:
  type: LoadBalancer
  ports:
  - port: 8080
  selector:
    app: hello
  1. Check connectivity:
$ curl $(kubectl get service hello -o jsonpath='{.status.loadBalancer.ingress[0].ip}'):8080
Hello World from hello-6bcc85747b-mxwl4!

K8s container networking

A short course on Kubernetes container networking: http://lendulet.tmit.bme.hu/~levai/k8s/kubernetes_intro_aws.html

Acknowledgments

Original idea and first implementation from rg0now.

License

Licensed under GPLv3+.

About

Minimal webserver mainly used for teaching/debugging

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors