Skip to content

Instantly share code, notes, and snippets.

@davinkevin
Created May 13, 2022 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davinkevin/d49b3a5839cba50d2d07c6c9a2114d0b to your computer and use it in GitHub Desktop.
Save davinkevin/d49b3a5839cba50d2d07c6c9a2114d0b to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Namespace
metadata:
name: httpbin
---
apiVersion: v1
kind: Service
metadata:
name: httpbin
namespace: httpbin
labels:
app: httpbin
spec:
ports:
- name: http
port: 80
targetPort: 80
selector:
app: httpbin
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpbin
namespace: httpbin
spec:
replicas: 1
selector:
matchLabels:
app: httpbin
template:
metadata:
labels:
app: httpbin
spec:
containers:
- image: docker.io/kennethreitz/httpbin
name: httpbin
ports:
- containerPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: httpbin
namespace: httpbin
spec:
rules:
- host: httpbin.k3s.vm.gradle.macbook.local
http:
paths:
- path: "/"
pathType: Prefix
backend:
service:
name: httpbin
port:
name: http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment