Last active
June 14, 2021 18:51
-
-
Save garygan89/7bcf0b51b73a5f67a05f1294c00f7222 to your computer and use it in GitHub Desktop.
Hello World for k8s
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: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: hello-world | |
| namespace: default | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: hello-world | |
| template: | |
| metadata: | |
| labels: | |
| app: hello-world | |
| spec: | |
| containers: | |
| - name: hello-world-pod | |
| image: arungupta/helloworld-spring-boot:latest | |
| ports: | |
| - containerPort: 80 | |
| - containerPort: 443 | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: hello-world-service | |
| spec: | |
| selector: | |
| app: hello-world | |
| ports: | |
| - name: http | |
| protocol: TCP | |
| port: 80 | |
| targetPort: 8080 | |
| type: LoadBalancer | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment