Last active
April 16, 2022 04:51
-
-
Save trinhpham/b9c3ca9cd062f494a3d93769d83809f7 to your computer and use it in GitHub Desktop.
Kube Cluster deployment test
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
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: hello | |
labels: | |
app: hello | |
spec: | |
type: ClusterIP | |
ports: | |
- protocol: TCP | |
name: http | |
port: 8080 | |
targetPort: 8080 | |
selector: | |
app: hello | |
--- | |
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: hello | |
labels: | |
app: hello | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hello | |
template: | |
metadata: | |
labels: | |
app: hello | |
spec: | |
containers: | |
- name: hello | |
# image: paulbouwer/hello-kubernetes:1.8 | |
image: gcr.io/google-samples/hello-app:1.0 | |
ports: | |
- containerPort: 8080 | |
--- | |
apiVersion: networking.k8s.io/v1 # for versions before 1.14 use extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: hello | |
annotations: | |
kubernetes.io/ingress.class: "nginx" | |
#nginx.ingress.kubernetes.io/rewrite-target: /$1 | |
#nginx.ingress.kubernetes.io/whitelist-source-range: 192.168.147.174/32 | |
spec: | |
ingressClassName: nginx | |
rules: | |
- host: hello.info | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: hello | |
servicePort: 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment