Created
April 17, 2018 12:43
-
-
Save ffledgling/5d2ecc35a5270399ac1cf462fe068eb6 to your computer and use it in GitHub Desktop.
Spin up a hello world server in kubernetes
This file contains 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: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: echo | |
spec: | |
template: | |
metadata: | |
labels: | |
app: echo | |
spec: | |
containers: | |
- image: hashicorp/http-echo | |
name: echo | |
ports: | |
- containerPort: 5678 | |
args: | |
- -text="Hello World" | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: echo | |
annotations: | |
# Annotation for use by external-dns, otherwise it's ignored. | |
external-dns.alpha.kubernetes.io/hostname: echo.example.com | |
spec: | |
selector: | |
app: echo | |
type: LoadBalancer | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 5678 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment