Created
May 31, 2020 06:00
-
-
Save zufardhiyaulhaq/c7d59b0725e6c23e5bf6daeeb82b3333 to your computer and use it in GitHub Desktop.
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: v1 | |
kind: Namespace | |
metadata: | |
name: nginx-example | |
labels: | |
app: nginx | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
namespace: nginx-example | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: nginx | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- image: nginx:1.17.6 | |
name: nginx | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: nginx | |
name: my-nginx | |
namespace: nginx-example | |
spec: | |
ports: | |
- port: 80 | |
targetPort: 80 | |
selector: | |
app: nginx | |
type: ClusterIP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment