Skip to content

Instantly share code, notes, and snippets.

@lmarqs
Created June 6, 2023 21:20
Show Gist options
  • Select an option

  • Save lmarqs/48436106c28fa000cc2f29c72db1f753 to your computer and use it in GitHub Desktop.

Select an option

Save lmarqs/48436106c28fa000cc2f29c72db1f753 to your computer and use it in GitHub Desktop.
Kubernetes hello word!
# install
helm repo add stakater https://stakater.github.io/stakater-charts
helm repo update
helm install app-lucas-marques stakater/application
# check
curl http://aaa18f0945c0c4557a4d374e30322eed-541031350.us-east-1.elb.amazonaws.com -H 'Host: lucas-marques.medprev.app'
# uninstall
helm uninstall app-lucas-marques
applicationName: app-lucas-marques
deployment:
image:
repository: php
tag: 8.2-apache
replica: 1
containerSecurityContext:
runAsNonRoot: false
readOnlyRootFilesystem: false
ports:
- containerPort: 80
name: http
volumeMounts:
www:
mountPath: /var/www/html/index.php
subPath: index.php
volumes:
www:
configMap:
name: app-lucas-marques-www
service:
enabled: true
ports:
- port: 80
name: http
protocol: TCP
targetPort: 80
ingress:
enabled: true
ingressClassName: nginx
hosts:
- host: lucas-marques.medprev.app
rbac:
serviceAccount:
enabled: true
configMap:
enabled: true
files:
www:
index.php: |
<?php
echo "Hello Lucas Marques!";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment