Skip to content

Instantly share code, notes, and snippets.

@garygan89
Last active June 14, 2021 18:51
Show Gist options
  • Select an option

  • Save garygan89/7bcf0b51b73a5f67a05f1294c00f7222 to your computer and use it in GitHub Desktop.

Select an option

Save garygan89/7bcf0b51b73a5f67a05f1294c00f7222 to your computer and use it in GitHub Desktop.
Hello World for k8s
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