$ docker build -t localhost:5000/myapp . --push
Created
October 10, 2023 19:40
-
-
Save leandronsp/03f84ebde1a7886cccf366bcaac8572d to your computer and use it in GitHub Desktop.
Provisionar um registro de imagens Docker em cluster Kubernetes local
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: Pod | |
metadata: | |
labels: | |
app: myapp | |
name: myapp | |
namespace: default | |
spec: | |
containers: | |
- image: localhost:5000/myapp | |
name: myapp |
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: Pod | |
metadata: | |
name: registry | |
namespace: default | |
spec: | |
containers: | |
- name: registry | |
image: registry:2 | |
ports: | |
- containerPort: 5000 |
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: Service | |
metadata: | |
name: registry | |
spec: | |
selector: | |
app: registry | |
ports: | |
- protocol: TCP | |
port: 5000 | |
targetPort: 5000 | |
type: LoadBalancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment