-
-
Save DevIsraelSantos/21aae6e8d4b00285f2451ee03d297c6b to your computer and use it in GitHub Desktop.
Código fonte para o vídeo de hospedagem Kubernetes com Azure: https://www.youtube.com/watch?v=gbZ-rKfuwpE
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: vote-api | |
labels: | |
app: vote-api | |
spec: | |
selector: | |
matchLabels: | |
app: vote-api | |
replicas: 10 | |
template: | |
metadata: | |
labels: | |
app: vote-api | |
spec: | |
containers: | |
- name: vote-api-container | |
image: khaosdoctor/go-vote-api | |
resources: | |
limits: | |
cpu: 50m | |
memory: 50M | |
ports: | |
- containerPort: 8080 | |
name: http | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: vote-api | |
spec: | |
selector: | |
app: vote-api | |
ports: | |
- name: default | |
port: 80 | |
targetPort: http | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: vote-api | |
annotations: | |
kubernetes.io/ingress.class: addon-http-application-routing | |
spec: | |
rules: | |
- host: api.<seu dns> | |
http: | |
paths: | |
- pathType: Prefix | |
path: / | |
backend: | |
service: | |
name: vote-api | |
port: | |
name: default |
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
kubectl apply -f ./api.yaml |
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
az aks install-cli | |
az aks get-credentials -n demo -g demo --admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fix line 3 for "metadata".