Last active
November 25, 2022 23:38
-
-
Save khaosdoctor/097ac324b9e59ab137c931d3d33ee773 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 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 | |
metadada: | |
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 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 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
Existe um problema na linha 3.
A palavra "metadata" esta escrita "medatada".
https://gist.github.com/DevIsraelSantos/21aae6e8d4b00285f2451ee03d297c6b