-
-
Save alexisP/189da9404b84a17d85909d391d7e5577 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
cat <<EOF | kubectl apply -f - | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: sample-app | |
labels: | |
app: sample-app | |
spec: | |
containers: | |
- image: "aplantin.azurecr.io/sample-app:1.0" | |
name: sample-app | |
ports: | |
- containerPort: 8080 | |
protocol: TCP | |
EOF | |
cat <<EOF | kubectl apply -f - | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: sample-app-service | |
annotations: | |
service.beta.kubernetes.io/azure-load-balancer-internal: "true" | |
spec: | |
type: LoadBalancer | |
selector: | |
app: sample-app | |
ports: | |
- name: http | |
protocol: TCP | |
port: 80 | |
targetPort: 8080 | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment