--- apiVersion: v1 kind: ConfigMap metadata: name: hello-httpd-page data: index.html: |
Served by Apache httpd on a CloudStack Kubernetes Service cluster.
--- apiVersion: apps/v1 kind: Deployment metadata: name: hello-httpd spec: replicas: 2 selector: matchLabels: app: hello-httpd template: metadata: labels: app: hello-httpd spec: containers: - name: httpd image: httpd:2.4-alpine ports: - containerPort: 80 volumeMounts: - name: page mountPath: /usr/local/apache2/htdocs volumes: - name: page configMap: name: hello-httpd-page --- apiVersion: v1 kind: Service metadata: name: hello-httpd spec: type: LoadBalancer selector: app: hello-httpd ports: - name: http port: 80 targetPort: 80 protocol: TCP