Created
November 22, 2021 00:22
-
-
Save os6sense/b9720881b2172c07eb88fea6cad006cf to your computer and use it in GitHub Desktop.
http-echo with working microk8s ingress example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
app.kubernetes.io/name: http-echo | |
run: http-echo | |
app: http-echo | |
name: http-echo | |
spec: | |
containers: | |
- image: hashicorp/http-echo | |
name: http-echo | |
resources: {} | |
args: | |
- -text="hello woooorld" | |
- -listen=:8080 | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
status: {} | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: http-echo | |
spec: | |
selector: | |
app: http-echo | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 8080 | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: http-echo | |
annotations: | |
kubernetes.io/ingress.class: public | |
spec: | |
rules: | |
- http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: http-echo | |
port: | |
number: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment