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: Pod | |
apiVersion: v1 | |
metadata: | |
name: simple-volume-pod | |
spec: | |
# Volumes are declared by the pod. They share its lifecycle | |
# and are communal across containers. | |
volumes: | |
# Volumes have a name and configuration based on the type of volume. | |
# In this example, we use the emptyDir volume type |
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: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: example-ingress | |
annotations: | |
ingress.kubernetes.io/rewrite-target: / | |
spec: | |
rules: | |
- http: | |
paths: |
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: Pod | |
apiVersion: v1 | |
metadata: | |
name: banana-app | |
labels: | |
app: banana | |
spec: | |
containers: | |
- name: banana-app | |
image: hashicorp/http-echo |
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: Pod | |
apiVersion: v1 | |
metadata: | |
name: apple-app | |
labels: | |
app: apple | |
spec: | |
containers: | |
- name: apple-app | |
image: hashicorp/http-echo |
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: Pod | |
apiVersion: v1 | |
metadata: | |
name: example-pod | |
spec: | |
containers: | |
- image: nginx | |
name: example-container |
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 config view | |
apiVersion: v1 | |
clusters: | |
- cluster: | |
insecure-skip-tls-verify: true | |
server: https://localhost:6443 | |
name: docker-for-desktop-cluster | |
- cluster: | |
certificate-authority: /Users/matthewpalmer/.minikube/ca.crt | |
server: https://192.168.99.100:8443 |
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: port-example-svc | |
spec: | |
# Make the service externally visible via the node | |
type: NodePort | |
ports: | |
# Which port on the node is the service available through? |
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
# Create a pod containing the PHP-FPM application (my-php-app) | |
# and nginx, each mounting the `shared-files` volume to their | |
# respective /var/www/html directories. | |
kind: Pod | |
apiVersion: v1 | |
metadata: | |
name: phpfpm-nginx-example | |
spec: | |
volumes: |
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
# First, create a ConfigMap whose contents are used | |
# as the nginx.conf file in the web server. | |
# This server uses /var/www/html as its | |
# root document directory. When the server gets a | |
# request for *.php, it will forward that request | |
# to our PHP-FPM container. | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: |
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
# docker build . -t my-php-app:1.0.0 | |
FROM php:7.2-fpm | |
RUN mkdir /app | |
COPY hello.php /app |