| @ -1,2 +0,0 @@ | |||||
| curl "http://localhost:30780/rest/$1?u=admin&p=bazsom-bawtAq-5zense&c=miapp&v=1.15.0" | |||||
| @ -1,79 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: airsonic | |||||
| namespace: airsonic | |||||
| spec: | |||||
| type: NodePort | |||||
| ports: | |||||
| - name: http | |||||
| port: 4040 | |||||
| nodePort: 30680 | |||||
| targetPort: airsonic-http | |||||
| selector: | |||||
| app: airsonic | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: airsonic-pv-claim | |||||
| namespace: airsonic | |||||
| labels: | |||||
| app: airsonic | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| storageClassName: "" | |||||
| resources: | |||||
| requests: | |||||
| storage: 2Gi | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: airsonic | |||||
| namespace: airsonic | |||||
| labels: | |||||
| app: airsonic | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: airsonic | |||||
| tier: frontend | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: airsonic | |||||
| tier: frontend | |||||
| spec: | |||||
| containers: | |||||
| - env: | |||||
| - name: JAVA_OPTS | |||||
| value: -Dserver.port=4040 | |||||
| name: airsonic | |||||
| image: airsonic/airsonic | |||||
| #image: docker-registry:32000/airsonic:1.0 | |||||
| ports: | |||||
| - containerPort: 4040 | |||||
| name: "airsonic-http" | |||||
| volumeMounts: | |||||
| - name: airsonic-www-folder | |||||
| mountPath: /airsonic/data | |||||
| subPath: data | |||||
| - name: airsonic-www-folder | |||||
| mountPath: /airsonic/music | |||||
| subPath: music | |||||
| - name: airsonic-www-folder | |||||
| mountPath: /airsonic/playlists | |||||
| subPath: playlists | |||||
| - name: airsonic-www-folder | |||||
| mountPath: /airsonic/podcasts | |||||
| subPath: podcasts | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| volumes: | |||||
| - name: airsonic-www-folder | |||||
| persistentVolumeClaim: | |||||
| claimName: airsonic-pv-claim | |||||
| @ -1,4 +0,0 @@ | |||||
| kubectl create namespace airsonic | |||||
| kubectl create -f pv-local-airsonic.yaml | |||||
| kubectl create -k ./ | |||||
| watch kubectl get all -n airsonic | |||||
| @ -1 +0,0 @@ | |||||
| kubectl exec -ti deployment.apps/airsonic -n airsonic -- /bin/bash | |||||
| @ -1,4 +0,0 @@ | |||||
| resources: | |||||
| - registry-secrets.yaml | |||||
| - airsonic-deployment.yaml | |||||
| @ -1 +0,0 @@ | |||||
| kubectl -n airsonic logs `kubectl -n airsonic get pod|grep airsonic|cut -f1 -d' '` | |||||
| @ -1,3 +0,0 @@ | |||||
| kubectl delete -k ./ | |||||
| kubectl delete -f pv-local-airsonic.yaml | |||||
| kubectl delete namespace airsonic | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: airsonic-data-folder | |||||
| spec: | |||||
| capacity: | |||||
| storage: 2Gi | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| hostPath: | |||||
| path: "/mnt/Externo/airsonic" | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: airsonic-data-folder | |||||
| spec: | |||||
| capacity: | |||||
| storage: 2Gi | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| hostPath: | |||||
| path: "/mnt/cluster/airsonic" | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| data: | |||||
| .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXItcmVnaXN0cnk6MzIwMDAiOnsidXNlcm5hbWUiOiJjcmV5bG9wZXoiLCJwYXNzd29yZCI6IlJleS0xMTc2IiwiYXV0aCI6IlkzSmxlV3h2Y0dWNk9sSmxlUzB4TVRjMiJ9fX0= | |||||
| kind: Secret | |||||
| metadata: | |||||
| creationTimestamp: "2023-01-29T10:54:14Z" | |||||
| name: reg-cred-secret | |||||
| namespace: airsonic | |||||
| resourceVersion: "19890385" | |||||
| uid: 66b3b7c5-26c1-4e5a-af4e-dc973aaafe4b | |||||
| type: kubernetes.io/dockerconfigjson | |||||
| @ -1,13 +0,0 @@ | |||||
| services: | |||||
| airsonic: | |||||
| image: airsonic/airsonic | |||||
| container_name: airsonic | |||||
| restart: unless-stopped | |||||
| tty: false | |||||
| volumes: | |||||
| - /persisted/airsonic/data:/airsonic/data | |||||
| - /persisted/airsonic/playlists:/airsonic/playlists | |||||
| - /persisted/airsonic/podcasts:/airsonic/podcasts | |||||
| - /music:/airsonic/music | |||||
| ports: | |||||
| - 4040:4040 | |||||
| @ -1 +0,0 @@ | |||||
| Subproject commit 40efc5bea9d7c652f6e00a2a95e7027c1130f64b | |||||
| @ -1,33 +0,0 @@ | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: app-helloworld-two | |||||
| spec: | |||||
| replicas: 1 | |||||
| selector: | |||||
| matchLabels: | |||||
| app: app-helloworld-two | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: app-helloworld-two | |||||
| spec: | |||||
| containers: | |||||
| - name: app-helloworld-two | |||||
| image: nginx | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| env: | |||||
| - name: TITLE | |||||
| value: "Welcome to Azure Kubernetes Service (AKS)" | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: app-helloworld-two | |||||
| spec: | |||||
| type: ClusterIP | |||||
| ports: | |||||
| - port: 80 | |||||
| selector: | |||||
| app: app-helloworld-two | |||||
| @ -1,33 +0,0 @@ | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: app-helloworld-one | |||||
| spec: | |||||
| replicas: 1 | |||||
| selector: | |||||
| matchLabels: | |||||
| app: app-helloworld-one | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: app-helloworld-one | |||||
| spec: | |||||
| containers: | |||||
| - name: app-helloworld-one | |||||
| image: nginx | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| env: | |||||
| - name: TITLE | |||||
| value: "Welcome to Azure Kubernetes Service (AKS)" | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: app-helloworld-one | |||||
| spec: | |||||
| type: ClusterIP | |||||
| ports: | |||||
| - port: 80 | |||||
| selector: | |||||
| app: app-helloworld-one | |||||
| @ -1,4 +0,0 @@ | |||||
| kubectl create -f pv-local-dos.yaml | |||||
| kubectl create -f pv-local-uno.yaml | |||||
| kubectl create -k ./ | |||||
| #watch kubectl get all | |||||
| @ -1,61 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: hello-dos | |||||
| spec: | |||||
| type: ClusterIP | |||||
| ports: | |||||
| - name: http | |||||
| port: 80 | |||||
| selector: | |||||
| app: hello-dos | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: hello-dos-pv-claim | |||||
| labels: | |||||
| app: hello-dos | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| storageClassName: "" | |||||
| resources: | |||||
| requests: | |||||
| storage: 2Gi | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: hello-dos | |||||
| labels: | |||||
| app: hello-dos | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: hello-dos | |||||
| tier: frontend | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: hello-dos | |||||
| tier: frontend | |||||
| spec: | |||||
| containers: | |||||
| - name: hello-dos | |||||
| #image: linuxserver/nginx | |||||
| image: docker-registry:32000/minginx:2.0 | |||||
| #image: httpd | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| volumeMounts: | |||||
| - name: hello-dos-folder | |||||
| mountPath: /usr/share/nginx/html | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| volumes: | |||||
| - name: hello-dos-folder | |||||
| persistentVolumeClaim: | |||||
| claimName: hello-dos-pv-claim | |||||
| @ -1 +0,0 @@ | |||||
| kubectl exec -ti deployment.apps/app-helloworld-one -- /bin/bash | |||||
| @ -1 +0,0 @@ | |||||
| kubectl exec -ti deployment.apps/app-helloworld-two -- /bin/bash | |||||
| @ -1,36 +0,0 @@ | |||||
| apiVersion: networking.k8s.io/v1 | |||||
| kind: Ingress | |||||
| metadata: | |||||
| name: hello-world-ingress | |||||
| annotations: | |||||
| nginx.ingress.kubernetes.io/ssl-redirect: "false" | |||||
| nginx.ingress.kubernetes.io/use-regex: "true" | |||||
| nginx.ingress.kubernetes.io/rewrite-target: /$2 | |||||
| spec: | |||||
| ingressClassName: nginx | |||||
| rules: | |||||
| - host: k8s-server | |||||
| http: | |||||
| paths: | |||||
| - path: /hello-world-one(/|$)(.*) | |||||
| pathType: Prefix | |||||
| backend: | |||||
| service: | |||||
| name: hello-uno | |||||
| port: | |||||
| number: 80 | |||||
| - path: /hello-world-two(/|$)(.*) | |||||
| pathType: Prefix | |||||
| backend: | |||||
| service: | |||||
| name: hello-dos | |||||
| port: | |||||
| number: 80 | |||||
| - path: /(.*) | |||||
| pathType: Prefix | |||||
| backend: | |||||
| service: | |||||
| name: hello-uno | |||||
| port: | |||||
| number: 80 | |||||
| @ -1,4 +0,0 @@ | |||||
| resources: | |||||
| - uno-deployment.yaml | |||||
| - dos-deployment.yaml | |||||
| - ingress.yaml | |||||
| @ -1,3 +0,0 @@ | |||||
| kubectl delete -k ./ | |||||
| kubectl delete -f pv-local-uno.yaml | |||||
| kubectl delete -f pv-local-dos.yaml | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: hello-dos-folder | |||||
| spec: | |||||
| capacity: | |||||
| storage: 2Gi | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| hostPath: | |||||
| path: "/mnt/cluster/hello/dos" | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: hello-uno-folder | |||||
| spec: | |||||
| capacity: | |||||
| storage: 2Gi | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| hostPath: | |||||
| path: "/mnt/cluster/hello/uno" | |||||
| @ -1,61 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: hello-uno | |||||
| spec: | |||||
| type: ClusterIP | |||||
| ports: | |||||
| - name: http | |||||
| port: 80 | |||||
| selector: | |||||
| app: hello-uno | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: hello-uno-pv-claim | |||||
| labels: | |||||
| app: hello-uno | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| storageClassName: "" | |||||
| resources: | |||||
| requests: | |||||
| storage: 2Gi | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: hello-uno | |||||
| labels: | |||||
| app: hello-uno | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: hello-uno | |||||
| tier: frontend | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: hello-uno | |||||
| tier: frontend | |||||
| spec: | |||||
| containers: | |||||
| - name: hello-uno | |||||
| #image: linuxserver/nginx | |||||
| image: docker-registry:32000/minginx:2.0 | |||||
| #image: httpd | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| volumeMounts: | |||||
| - name: hello-uno-folder | |||||
| mountPath: /usr/share/nginx/html | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| volumes: | |||||
| - name: hello-uno-folder | |||||
| persistentVolumeClaim: | |||||
| claimName: hello-uno-pv-claim | |||||
| @ -1,4 +0,0 @@ | |||||
| kubectl create -f pv-local-mysql.yaml | |||||
| kubectl create -f pv-local-wordpress.yaml | |||||
| kubectl create -k ./ | |||||
| #watch kubectl get all -n wordpress | |||||
| @ -1 +0,0 @@ | |||||
| kubectl exec -ti deployment.apps/wordpress -n wordpress -- /bin/bash | |||||
| @ -1,23 +0,0 @@ | |||||
| apiVersion: networking.k8s.io/v1 | |||||
| kind: Ingress | |||||
| metadata: | |||||
| name: wordpress-ingress | |||||
| namespace: wordpress-ingress | |||||
| annotations: | |||||
| nginx.ingress.kubernetes.io/ssl-redirect: "false" | |||||
| nginx.ingress.kubernetes.io/use-regex: "true" | |||||
| nginx.ingress.kubernetes.io/rewrite-target: /$2 | |||||
| spec: | |||||
| ingressClassName: nginx | |||||
| rules: | |||||
| - host: k8s-server | |||||
| http: | |||||
| paths: | |||||
| - path: /wordpress(/|$)(.*) | |||||
| pathType: Prefix | |||||
| backend: | |||||
| service: | |||||
| name: wordpress-ingress | |||||
| port: | |||||
| number: 80 | |||||
| @ -1,7 +0,0 @@ | |||||
| resources: | |||||
| - wp-namespace.yaml | |||||
| - wordpress-secrets.yaml | |||||
| - registry-secrets.yaml | |||||
| - mysql-deployment.yaml | |||||
| - wordpress-deployment.yaml | |||||
| - php-deployment.yaml | |||||
| @ -1,70 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: wordpress-ingress-mysql | |||||
| namespace: wordpress-ingress | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| spec: | |||||
| ports: | |||||
| - port: 3306 | |||||
| selector: | |||||
| app: wordpress-ingress | |||||
| tier: mysql | |||||
| clusterIP: None | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: mysql-wp-ingress-pv-claim | |||||
| namespace: wordpress-ingress | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| resources: | |||||
| requests: | |||||
| storage: 20Gi | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: wordpress-ingress-mysql | |||||
| namespace: wordpress-ingress | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: wordpress-ingress | |||||
| tier: mysql | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| tier: mysql | |||||
| spec: | |||||
| containers: | |||||
| - image: docker-registry:32000/mariadb:1.0 | |||||
| name: mysql | |||||
| env: | |||||
| - name: MYSQL_ROOT_PASSWORD | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlwp-pass | |||||
| key: password | |||||
| ports: | |||||
| - containerPort: 3306 | |||||
| name: mysql | |||||
| volumeMounts: | |||||
| - name: mysql-persistent-storage | |||||
| mountPath: /var/lib/mysql | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| volumes: | |||||
| - name: mysql-persistent-storage | |||||
| persistentVolumeClaim: | |||||
| claimName: mysql-wp-ingress-pv-claim | |||||
| @ -1,3 +0,0 @@ | |||||
| kubectl delete -k ./ | |||||
| kubectl delete -f pv-local-mysql.yaml | |||||
| kubectl delete -f pv-local-wordpress.yaml | |||||
| @ -1,55 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: phpmyadmin-wordpress-ingress | |||||
| namespace: wordpress-ingress | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| spec: | |||||
| selector: | |||||
| app: wordpress-ingress | |||||
| tier: phpmyadmin | |||||
| type: NodePort | |||||
| ports: | |||||
| - name: phpadmin | |||||
| port: 80 | |||||
| targetPort: phpmyadm | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: phpmyadmin-wordpress-ingress | |||||
| namespace: wordpress-ingress | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: wordpress-ingress | |||||
| tier: phpmyadmin | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| tier: phpmyadmin | |||||
| spec: | |||||
| containers: | |||||
| - name: phpmyadmin | |||||
| image: docker-registry:32000/phpmyadmin:1.0 | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| name: phpmyadm | |||||
| env: | |||||
| - name: PMA_HOST | |||||
| value: wordpress-ingress-mysql | |||||
| - name: PMA_PORT | |||||
| value: "3306" | |||||
| - name: MYSQL_ROOT_PASSWORD | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlwp-pass | |||||
| key: password | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: wp-ingress-data | |||||
| spec: | |||||
| capacity: | |||||
| storage: 20Gi | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| hostPath: | |||||
| path: "/mnt/Externo/wordpress/wordpress-db" | |||||
| @ -1,12 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: wp-ingress-folder | |||||
| spec: | |||||
| capacity: | |||||
| storage: 10Gi | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| hostPath: | |||||
| path: "/mnt/Externo/wordpress/wordpress-wp" | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| data: | |||||
| .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXItcmVnaXN0cnk6MzIwMDAiOnsidXNlcm5hbWUiOiJjcmV5bG9wZXoiLCJwYXNzd29yZCI6IlJleS0xMTc2IiwiYXV0aCI6IlkzSmxlV3h2Y0dWNk9sSmxlUzB4TVRjMiJ9fX0= | |||||
| kind: Secret | |||||
| metadata: | |||||
| creationTimestamp: "2023-01-29T10:54:14Z" | |||||
| name: reg-cred-secret | |||||
| namespace: wordpress-ingress | |||||
| resourceVersion: "19890385" | |||||
| uid: 66b3b7c5-26c1-4e5a-af4e-dc973aaafe4b | |||||
| type: kubernetes.io/dockerconfigjson | |||||
| @ -1,77 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: wordpress-ingress | |||||
| namespace: wordpress-ingress | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| spec: | |||||
| type: ClusterIP | |||||
| ports: | |||||
| - port: 80 | |||||
| selector: | |||||
| app: wordpress-ingress | |||||
| tier: frontend | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: wp-ingress-pv-claim | |||||
| namespace: wordpress-ingress | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| storageClassName: "" | |||||
| resources: | |||||
| requests: | |||||
| storage: 10Gi | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: wordpress-ingress | |||||
| namespace: wordpress-ingress | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: wordpress-ingress | |||||
| tier: frontend | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: wordpress-ingress | |||||
| tier: frontend | |||||
| spec: | |||||
| containers: | |||||
| - image: docker-registry:32000/wordpress:1.0 | |||||
| name: wordpress-ingress | |||||
| env: | |||||
| - name: WORDPRESS_DB_HOST | |||||
| value: wordpress-ingress-mysql | |||||
| - name: WORDPRESS_DB_PASSWORD | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlwp-pass | |||||
| key: password | |||||
| - name: WORDPRESS_DB_USER | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlwp-pass | |||||
| key: db_user | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| volumeMounts: | |||||
| - name: wordpress-ingress-persistent-storage | |||||
| mountPath: /var/www/html | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| volumes: | |||||
| - name: wordpress-ingress-persistent-storage | |||||
| persistentVolumeClaim: | |||||
| claimName: wp-ingress-pv-claim | |||||
| @ -1,9 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Secret | |||||
| metadata: | |||||
| name: mysqlwp-pass | |||||
| namespace: wordpress-ingress | |||||
| data: | |||||
| password: RHNhLTAyMTM= | |||||
| db_user: cm9vdA== | |||||
| db_passwd: RHNhLTAyMTM= | |||||
| @ -1,18 +0,0 @@ | |||||
| apiVersion: networking.k8s.io/v1 | |||||
| kind: Ingress | |||||
| metadata: | |||||
| name: wordpress-ingress | |||||
| namespace: wordpress | |||||
| annotations: | |||||
| ingress.kubernetes.io/rewrite-target: / | |||||
| spec: | |||||
| rules: | |||||
| - http: | |||||
| paths: | |||||
| - path: / | |||||
| pathType: Prefix | |||||
| backend: | |||||
| service: | |||||
| name: wordpress | |||||
| port: | |||||
| number: 80 | |||||
| @ -1,4 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Namespace | |||||
| metadata: | |||||
| name: wordpress-ingress | |||||
| @ -1,8 +0,0 @@ | |||||
| resources: | |||||
| - miweb-configmap.yaml | |||||
| - miweb-deployment.yaml | |||||
| - miweb-service.yaml | |||||
| - miweb-ingress.yaml | |||||
| - miweb-letsencrypt-job.yaml | |||||
| - miweb-letsencrypt-service.yaml | |||||
| - miweb-letsencrypt-certs.yaml | |||||
| @ -1,23 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: ConfigMap | |||||
| metadata: | |||||
| name: nginx-config | |||||
| data: | |||||
| default.conf: | | |||||
| upstream letsencrypt { | |||||
| server letsencrypt:80 max_fails=0 fail_timeout=1s; | |||||
| } | |||||
| server { | |||||
| listen 80; | |||||
| listen [::]:80; | |||||
| server_name _; | |||||
| location / { | |||||
| add_header Content-Type text/plain; # Prevents download | |||||
| return 200 "¡Hola mundo! Demo de Kubernetes + Let's encrypt."; | |||||
| } | |||||
| # Redirect all traffic in /.well-known/ to letsencrypt | |||||
| location ^~ /.well-known/acme-challenge/ { | |||||
| proxy_pass http://letsencrypt; | |||||
| } | |||||
| } | |||||
| @ -1,29 +0,0 @@ | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| labels: | |||||
| app: nginx | |||||
| name: nginx | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: nginx | |||||
| replicas: 1 | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: nginx | |||||
| spec: | |||||
| containers: | |||||
| - name: nginx | |||||
| image: nginx | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| volumeMounts: | |||||
| - name: nginx-configs | |||||
| mountPath: /etc/nginx/conf.d | |||||
| # Load the configuration files for nginx | |||||
| volumes: | |||||
| - name: nginx-configs | |||||
| configMap: | |||||
| name: nginx-config | |||||
| @ -1,21 +0,0 @@ | |||||
| apiVersion: networking.k8s.io/v1 | |||||
| kind: Ingress | |||||
| metadata: | |||||
| name: "kubernetes-demo-app-ingress-service" | |||||
| spec: | |||||
| tls: | |||||
| - hosts: | |||||
| - reymota.ddns.net | |||||
| secretName: letsencrypt-certs | |||||
| rules: | |||||
| - host: reymota.ddns.net # CHANGE ME! | |||||
| http: | |||||
| paths: | |||||
| # The * is needed so that all traffic gets redirected to nginx | |||||
| - path: /* | |||||
| pathType: Prefix | |||||
| backend: | |||||
| service: | |||||
| name: nginx | |||||
| port: | |||||
| number: 80 | |||||
| @ -1,6 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Secret | |||||
| metadata: | |||||
| name: letsencrypt-certs | |||||
| type: Opaque | |||||
| # Create an empty secret (with no data) in order for the update to work | |||||
| @ -1,30 +0,0 @@ | |||||
| apiVersion: batch/v1 | |||||
| kind: Job | |||||
| metadata: | |||||
| name: letsencrypt-job | |||||
| labels: | |||||
| app: letsencrypt | |||||
| spec: | |||||
| template: | |||||
| metadata: | |||||
| name: letsencrypt | |||||
| labels: | |||||
| app: letsencrypt | |||||
| spec: | |||||
| containers: | |||||
| # Bash script that starts an http server and launches certbot | |||||
| # Fork of github.com/sjenning/kube-nginx-letsencrypt | |||||
| - image: quay.io/hiphipjorge/kube-nginx-letsencrypt:latest | |||||
| name: letsencrypt | |||||
| imagePullPolicy: Always | |||||
| ports: | |||||
| - name: letsencrypt | |||||
| containerPort: 80 | |||||
| env: | |||||
| - name: DOMAINS | |||||
| value: reymota.ddns.net # Domain you want to use. CHANGE ME! | |||||
| - name: EMAIL | |||||
| value: king.bernard.b@gmail.com # Your email. CHANGE ME! | |||||
| - name: SECRET | |||||
| value: letsencrypt-certs | |||||
| restartPolicy: Never | |||||
| @ -1,10 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: letsencrypt | |||||
| spec: | |||||
| selector: | |||||
| app: letsencrypt | |||||
| ports: | |||||
| - protocol: "TCP" | |||||
| port: 80 | |||||
| @ -1,12 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: nginx | |||||
| spec: | |||||
| selector: | |||||
| app: nginx | |||||
| type: NodePort | |||||
| ports: | |||||
| - protocol: "TCP" | |||||
| nodePort: 30080 | |||||
| port: 80 | |||||
| @ -1,4 +0,0 @@ | |||||
| FROM php:7.4-fpm | |||||
| RUN mkdir /app | |||||
| WORKDIR /app | |||||
| COPY src . | |||||
| @ -1,15 +0,0 @@ | |||||
| apiVersion: cert-manager.io/v1 | |||||
| kind: ClusterIssuer | |||||
| metadata: | |||||
| name: letsencrypt-prod-site | |||||
| namespace: cert-manager | |||||
| spec: | |||||
| acme: | |||||
| server: https://acme-v02.api.letsencrypt.org/directory | |||||
| email: king.bernard.b@gmail.com | |||||
| privateKeySecretRef: | |||||
| name: letsencrypt-prod-site | |||||
| solvers: | |||||
| - http01: | |||||
| ingress: | |||||
| class: nginx | |||||
| @ -1,3 +0,0 @@ | |||||
| POD_NAMESPACE=ingress-nginx | |||||
| POD_NAME=$(kubectl get pods -n $POD_NAMESPACE -l app.kubernetes.io/name=ingress-nginx --field-selector=status.phase=Running -o name) | |||||
| kubectl exec $POD_NAME -n $POD_NAMESPACE -- /nginx-ingress-controller --version | |||||
| @ -1,27 +0,0 @@ | |||||
| kind: ConfigMap | |||||
| apiVersion: v1 | |||||
| metadata: | |||||
| name: nginx-config | |||||
| data: | |||||
| nginx.conf: | | |||||
| events { | |||||
| } | |||||
| http { | |||||
| server { | |||||
| listen 80 default_server; | |||||
| listen [::]:80 default_server; | |||||
| root /var/www/html; | |||||
| index index.html index.htm index.php; | |||||
| server_name _; | |||||
| location / { | |||||
| try_files $uri $uri/ =404; | |||||
| } | |||||
| location ~ \.php$ { | |||||
| include fastcgi_params; | |||||
| fastcgi_param REQUEST_METHOD $request_method; | |||||
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||||
| fastcgi_pass 127.0.0.1:9000; | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -1,72 +0,0 @@ | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: deployment | |||||
| labels: | |||||
| name: deployment | |||||
| spec: | |||||
| replicas: 3 | |||||
| strategy: | |||||
| type: RollingUpdate | |||||
| rollingUpdate: | |||||
| maxSurge: 1 | |||||
| maxUnavailable: 2 | |||||
| selector: | |||||
| matchLabels: | |||||
| name: templated-pod | |||||
| template: | |||||
| metadata: | |||||
| name: deployment-template | |||||
| labels: | |||||
| name: templated-pod | |||||
| spec: | |||||
| volumes: | |||||
| - name: app-files | |||||
| emptyDir: {} | |||||
| - name: nginx-config-volume | |||||
| configMap: | |||||
| name: nginx-config | |||||
| containers: | |||||
| - image: docker-registry:32000/creylopez/kphp:v1 | |||||
| name: app | |||||
| volumeMounts: | |||||
| - name: app-files | |||||
| mountPath: /var/www/html | |||||
| lifecycle: | |||||
| postStart: | |||||
| exec: | |||||
| command: ["/bin/sh", "-c", "cp -r /app/. /var/www/html"] | |||||
| resources: | |||||
| limits: | |||||
| cpu: 100m | |||||
| requests: | |||||
| cpu: 50m | |||||
| - image: nginx:latest | |||||
| name: nginx | |||||
| volumeMounts: | |||||
| - name: app-files | |||||
| mountPath: /var/www/html | |||||
| - name: nginx-config-volume | |||||
| mountPath: /etc/nginx/nginx.conf | |||||
| subPath: nginx.conf | |||||
| resources: | |||||
| limits: | |||||
| cpu: 100m | |||||
| requests: | |||||
| cpu: 50m | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| readinessProbe: | |||||
| httpGet: | |||||
| path: / | |||||
| port: 80 | |||||
| initialDelaySeconds: 3 | |||||
| periodSeconds: 3 | |||||
| successThreshold: 1 | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| @ -1,25 +0,0 @@ | |||||
| apiVersion: networking.k8s.io/v1 | |||||
| kind: Ingress | |||||
| metadata: | |||||
| name: ingress | |||||
| annotations: | |||||
| kubernetes.io/ingress.class: "nginx" | |||||
| cert-manager.io/cluster-issuer: "letsencrypt-prod-site" | |||||
| spec: | |||||
| tls: | |||||
| - hosts: | |||||
| - reymota.ddns.net | |||||
| secretName: site-tls | |||||
| rules: | |||||
| - host: reymota.ddns.net | |||||
| http: | |||||
| paths: | |||||
| - path: / | |||||
| pathType: Prefix | |||||
| backend: | |||||
| service: | |||||
| name: service-loadbalancer | |||||
| port: | |||||
| number: 80 | |||||
| @ -1 +0,0 @@ | |||||
| kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml | |||||
| @ -1 +0,0 @@ | |||||
| kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.5.1/deploy/static/provider/baremetal/deploy.yaml | |||||
| @ -1,22 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: service-loadbalancer | |||||
| spec: | |||||
| selector: | |||||
| name: templated-pod | |||||
| type: ClusterIP | |||||
| ports: | |||||
| - name: http | |||||
| nodePort: null | |||||
| port: 80 | |||||
| targetPort: 80 | |||||
| protocol: TCP | |||||
| # type: LoadBalancer | |||||
| # ports: | |||||
| # - port: 80 | |||||
| # targetPort: 80 | |||||
| # externalIPs: | |||||
| # - 192.168.1.147 | |||||
| @ -1,14 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: service-loadbalancer | |||||
| spec: | |||||
| selector: | |||||
| name: templated-pod | |||||
| ports: | |||||
| - port: 80 | |||||
| targetPort: 80 | |||||
| type: LoadBalancer | |||||
| externalIPs: | |||||
| - 192.168.1.147 | |||||
| @ -1,2 +0,0 @@ | |||||
| <?php | |||||
| phpinfo(); | |||||
| @ -1,7 +0,0 @@ | |||||
| FROM debian | |||||
| RUN apt-get update && apt-get install -y apache2 libapache2-mod-php7.4 php7.4 && apt-get clean && rm -rf /var/lib/apt/lists/* | |||||
| #ADD app /var/www/html/ | |||||
| #RUN rm /var/www/html/index.html | |||||
| EXPOSE 80 | |||||
| CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"] | |||||
| @ -1,24 +0,0 @@ | |||||
| # Backup date | |||||
| today=$(date "+%Y_%m_%d-%H_%M_%S") | |||||
| echo "Current date: $today" | |||||
| # build up filename | |||||
| # destination folder (change to your own needs) | |||||
| BACKUP_FOLDER=/tmp | |||||
| file_name=$BACKUP_FOLDER/bkup_mediawiki | |||||
| new_name=$file_name-$today.sql | |||||
| echo "Backup file name: " "$new_name" | |||||
| #sudo docker exec `sudo docker container ls | grep mysql_mediawiki | cut -f1 -d' '` /usr/bin/mysqldump -u root --password=Dsa-0213 mediawiki > $new_name | |||||
| sudo kubectl --kubeconfig /home/creylopez/.kube/config exec `kubectl --kubeconfig /home/creylopez/.kube/config get pod -n mediawiki|grep mysql|cut -f1 -d' '` -n mediawiki -- /usr/bin/mysqldump -u root --password=Dsa-0213 mediawiki > $new_name | |||||
| message="Backup stored "$today | |||||
| sudo -u creylopez cat $new_name | mail -s "Mediawiki backup finished" "creylopez@yahoo.es" | |||||
| sudo rm $new_name | |||||
| @ -1,20 +0,0 @@ | |||||
| # Backup date | |||||
| today=$(date "+%Y_%m_%d-%H_%M_%S") | |||||
| echo "Current date: $today" | |||||
| # build up filename | |||||
| # destination folder (change to your own needs) | |||||
| BACKUP_FOLDER=. | |||||
| file_name=$BACKUP_FOLDER/bkup_mediawiki | |||||
| new_name=$file_name-$today.sql | |||||
| echo "Backup file name: " "$new_name" | |||||
| sudo kubectl --kubeconfig /home/creylopez/.kube/config exec `kubectl --kubeconfig /home/creylopez/.kube/config get pod -n mediawiki|grep mysql|cut -f1 -d' '` -n mediawiki -- /usr/bin/mysqldump -u root --password=Dsa-0213 mediawiki > $new_name | |||||
| message="Backup stored "$today | |||||
| @ -1,4 +0,0 @@ | |||||
| kubectl create -f pv-local-mysql-mw.yaml | |||||
| kubectl create -f pv-local-mediawiki.yaml | |||||
| kubectl create -k ./ | |||||
| #watch kubectl get all -n mediawiki | |||||
| @ -1 +0,0 @@ | |||||
| kubectl exec -ti deployment.apps/mediawiki -n mediawiki -- /bin/bash | |||||
| @ -1 +0,0 @@ | |||||
| kubectl exec -ti deployment.apps/mediawiki-mysql -n mediawiki -- /bin/bash | |||||
| @ -1,13 +0,0 @@ | |||||
| secretGenerator: | |||||
| - name: mysqlmw-pass | |||||
| namespace: mediawiki | |||||
| literals: | |||||
| - password=Dsa-0213 | |||||
| - db_user=root | |||||
| - db_passwd=Dsa-0213 | |||||
| resources: | |||||
| - mw-namespace.yaml | |||||
| - registry-secrets.yaml | |||||
| - mysql-deployment-mw.yaml | |||||
| - mediawiki-deployment.yaml | |||||
| - php-myadmin-mw-deployment.yaml | |||||
| @ -1,85 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: mediawiki | |||||
| namespace: mediawiki | |||||
| labels: | |||||
| app: mediawiki | |||||
| spec: | |||||
| type: NodePort | |||||
| ports: | |||||
| - port: 80 | |||||
| nodePort: 30098 | |||||
| targetPort: mediawiki | |||||
| selector: | |||||
| app: mediawiki | |||||
| tier: frontend | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: mw-pv-claim | |||||
| namespace: mediawiki | |||||
| labels: | |||||
| app: mediawiki | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| storageClassName: "" | |||||
| resources: | |||||
| requests: | |||||
| storage: 10Gi | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: mediawiki | |||||
| namespace: mediawiki | |||||
| labels: | |||||
| app: mediawiki | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: mediawiki | |||||
| tier: frontend | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: mediawiki | |||||
| tier: frontend | |||||
| spec: | |||||
| containers: | |||||
| # - image: mediawiki | |||||
| - image: docker-registry:32000/mediawiki:1.0 | |||||
| name: mediawiki | |||||
| env: | |||||
| - name: DB_TYPE | |||||
| value: mysql | |||||
| - name: DB_NAME | |||||
| value: mediawiki | |||||
| - name: DB_HOST | |||||
| value: mediawiki-mysql | |||||
| - name: DB_PASS | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlmw-pass | |||||
| key: password | |||||
| - name: DB_USER | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlmw-pass | |||||
| key: db_user | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| name: mediawiki | |||||
| volumeMounts: | |||||
| - name: mediawiki-persistent-storage | |||||
| mountPath: /var/www/html | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| volumes: | |||||
| - name: mediawiki-persistent-storage | |||||
| persistentVolumeClaim: | |||||
| claimName: mw-pv-claim | |||||
| @ -1,4 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Namespace | |||||
| metadata: | |||||
| name: mediawiki | |||||
| @ -1,73 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: mediawiki-mysql | |||||
| namespace: mediawiki | |||||
| labels: | |||||
| app: mediawiki | |||||
| spec: | |||||
| type: NodePort | |||||
| ports: | |||||
| - name: mysql | |||||
| port: 3306 | |||||
| nodePort: 30381 | |||||
| targetPort: mysql | |||||
| selector: | |||||
| app: mediawiki | |||||
| tier: mysql | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: mysql-mw-pv-claim | |||||
| namespace: mediawiki | |||||
| labels: | |||||
| app: mediawiki | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| resources: | |||||
| requests: | |||||
| storage: 20Gi | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: mediawiki-mysql | |||||
| namespace: mediawiki | |||||
| labels: | |||||
| app: mediawiki | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: mediawiki | |||||
| tier: mysql | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: mediawiki | |||||
| tier: mysql | |||||
| spec: | |||||
| containers: | |||||
| - image: docker-registry:32000/mariadb:1.0 | |||||
| name: mysql | |||||
| env: | |||||
| - name: MYSQL_ROOT_PASSWORD | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlmw-pass | |||||
| key: password | |||||
| ports: | |||||
| - containerPort: 3306 | |||||
| name: mysql | |||||
| volumeMounts: | |||||
| - name: mysql-persistent-storage | |||||
| mountPath: /var/lib/mysql | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| volumes: | |||||
| - name: mysql-persistent-storage | |||||
| persistentVolumeClaim: | |||||
| claimName: mysql-mw-pv-claim | |||||
| @ -1,3 +0,0 @@ | |||||
| kubectl delete -k ./ | |||||
| kubectl delete -f pv-local-mysql-mw.yaml | |||||
| kubectl delete -f pv-local-mediawiki.yaml | |||||
| @ -1,57 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: phpmyadmin-mediawiki | |||||
| namespace: mediawiki | |||||
| labels: | |||||
| app: mediawiki | |||||
| spec: | |||||
| selector: | |||||
| app: mediawiki | |||||
| tier: phpmyadmin | |||||
| type: NodePort | |||||
| ports: | |||||
| - name: phpadmin | |||||
| port: 80 | |||||
| nodePort: 30380 | |||||
| targetPort: phpmyadm | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: phpmyadmin-mediawiki | |||||
| namespace: mediawiki | |||||
| labels: | |||||
| app: mediawiki | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: mediawiki | |||||
| tier: phpmyadmin | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: mediawiki | |||||
| tier: phpmyadmin | |||||
| spec: | |||||
| containers: | |||||
| - name: phpmyadmin | |||||
| image: docker-registry:32000/phpmyadmin:1.0 | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| name: phpmyadm | |||||
| env: | |||||
| - name: PMA_HOST | |||||
| value: mediawiki-mysql | |||||
| - name: PMA_PORT | |||||
| value: "3306" | |||||
| - name: MYSQL_ROOT_PASSWORD | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlmw-pass | |||||
| key: password | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| @ -1,12 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: mw-folder | |||||
| spec: | |||||
| capacity: | |||||
| storage: 10Gi | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| hostPath: | |||||
| path: "/mnt/cluster/mediawiki/mediawiki" | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: mw-data | |||||
| spec: | |||||
| capacity: | |||||
| storage: 20Gi | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| hostPath: | |||||
| path: "/mnt/cluster/mediawiki/mediawiki-db" | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| data: | |||||
| .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXItcmVnaXN0cnk6MzIwMDAiOnsidXNlcm5hbWUiOiJjcmV5bG9wZXoiLCJwYXNzd29yZCI6IlJleS0xMTc2IiwiYXV0aCI6IlkzSmxlV3h2Y0dWNk9sSmxlUzB4TVRjMiJ9fX0= | |||||
| kind: Secret | |||||
| metadata: | |||||
| creationTimestamp: "2023-01-29T10:54:14Z" | |||||
| name: reg-cred-secret | |||||
| namespace: mediawiki | |||||
| resourceVersion: "19890385" | |||||
| uid: 66b3b7c5-26c1-4e5a-af4e-dc973aaafe4b | |||||
| type: kubernetes.io/dockerconfigjson | |||||
| @ -1,4 +0,0 @@ | |||||
| kubectl create namespace navidrome | |||||
| kubectl create -f pv-local-navidrome.yaml | |||||
| kubectl create -k ./ | |||||
| watch kubectl get all -n navidrome | |||||
| @ -1,17 +0,0 @@ | |||||
| version: "3" | |||||
| services: | |||||
| navidrome: | |||||
| image: deluan/navidrome:latest | |||||
| user: 1000:1000 # should be owner of volumes | |||||
| ports: | |||||
| - "4533:4533" | |||||
| restart: unless-stopped | |||||
| environment: | |||||
| # Optional: put your config options customization here. Examples: | |||||
| ND_SCANSCHEDULE: 1h | |||||
| ND_LOGLEVEL: info | |||||
| ND_SESSIONTIMEOUT: 24h | |||||
| ND_BASEURL: "" | |||||
| volumes: | |||||
| - "/path/to/data:/data" | |||||
| - "/path/to/your/music/folder:/music:ro" | |||||
| @ -1 +0,0 @@ | |||||
| kubectl exec -ti deployment.apps/navidrome -n navidrome -- /bin/bash | |||||
| @ -1,2 +0,0 @@ | |||||
| resources: | |||||
| - navidrome-deployment.yaml | |||||
| @ -1 +0,0 @@ | |||||
| kubectl -n airsonic logs `kubectl -n airsonic get pod|grep airsonic|cut -f1 -d' '` | |||||
| @ -1,87 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: navidrome | |||||
| namespace: navidrome | |||||
| spec: | |||||
| type: NodePort | |||||
| ports: | |||||
| - name: http | |||||
| port: 4533 | |||||
| nodePort: 30781 | |||||
| targetPort: navidrome-http | |||||
| selector: | |||||
| app: navidrome | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: navidrome-data-claim | |||||
| namespace: navidrome | |||||
| labels: | |||||
| app: navidrome | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| storageClassName: "" | |||||
| resources: | |||||
| requests: | |||||
| storage: 2Gi | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: navidrome-music-claim | |||||
| namespace: navidrome | |||||
| labels: | |||||
| app: navidrome | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| storageClassName: "" | |||||
| resources: | |||||
| requests: | |||||
| storage: 20Gi | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: navidrome | |||||
| namespace: navidrome | |||||
| labels: | |||||
| app: navidrome | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: navidrome | |||||
| tier: frontend | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: navidrome | |||||
| tier: frontend | |||||
| spec: | |||||
| containers: | |||||
| - env: | |||||
| - name: JAVA_OPTS | |||||
| value: -Dserver.port=4533 | |||||
| name: navidrome | |||||
| image: deluan/navidrome:latest | |||||
| imagePullPolicy: IfNotPresent | |||||
| ports: | |||||
| - containerPort: 4533 | |||||
| name: "navidrome-http" | |||||
| volumeMounts: | |||||
| - name: navidrome-data-folder | |||||
| mountPath: /data | |||||
| - name: navidrome-music-folder | |||||
| mountPath: /music | |||||
| volumes: | |||||
| - name: navidrome-data-folder | |||||
| persistentVolumeClaim: | |||||
| claimName: navidrome-data-claim | |||||
| - name: navidrome-music-folder | |||||
| persistentVolumeClaim: | |||||
| claimName: navidrome-music-claim | |||||
| @ -1,3 +0,0 @@ | |||||
| kubectl delete -k ./ | |||||
| kubectl delete -f pv-local-navidrome.yaml | |||||
| kubectl delete namespace navidrome | |||||
| @ -1,23 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: navidrome-data-folder | |||||
| spec: | |||||
| capacity: | |||||
| storage: 2Gi | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| hostPath: | |||||
| path: "/mnt/Externo/navidrome/data" | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: navidrome-music-folder | |||||
| spec: | |||||
| capacity: | |||||
| storage: 20Gi | |||||
| accessModes: | |||||
| - ReadWriteMany | |||||
| hostPath: | |||||
| path: "/mnt/Externo/navidrome/music" | |||||
| @ -1,13 +0,0 @@ | |||||
| # Nextcloud | |||||
| para que funcione hay que dar permisos al directorio para www-data:www-data. | |||||
| El nombre del directorio está definido en | |||||
| nextcloud-deployment.yaml: subPath: server-data | |||||
| y este está alojado dentro del directorio definido en el volumen persistente. | |||||
| En micaso en | |||||
| pi@k8s-router:/media/discoexterno/owncloud/server-data $ | |||||
| @ -1,43 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: code-server | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: code | |||||
| spec: | |||||
| selector: | |||||
| pod-label: code-server-pod | |||||
| type: NodePort | |||||
| ports: | |||||
| - port: 9980 | |||||
| nodePort: 30389 | |||||
| targetPort: code | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: code-server | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: code | |||||
| spec: | |||||
| replicas: 1 | |||||
| selector: | |||||
| matchLabels: | |||||
| pod-label: code-server-pod | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| pod-label: code-server-pod | |||||
| spec: | |||||
| containers: | |||||
| - name: code | |||||
| image: collabora/code:6.4.10.10 | |||||
| env: | |||||
| - name: extra_params | |||||
| value: --o:ssl.enable=false | |||||
| ports: | |||||
| - containerPort: 9980 | |||||
| name: code | |||||
| @ -1,56 +0,0 @@ | |||||
| <?php | |||||
| $CONFIG = array ( | |||||
| 'htaccess.RewriteBase' => '/', | |||||
| 'memcache.local' => '\\OC\\Memcache\\APCu', | |||||
| 'apps_paths' => | |||||
| array ( | |||||
| 0 => | |||||
| array ( | |||||
| 'path' => '/var/www/html/apps', | |||||
| 'url' => '/apps', | |||||
| 'writable' => false, | |||||
| ), | |||||
| 1 => | |||||
| array ( | |||||
| 'path' => '/var/www/html/custom_apps', | |||||
| 'url' => '/custom_apps', | |||||
| 'writable' => true, | |||||
| ), | |||||
| ), | |||||
| 'instanceid' => 'ocpl3k6iguxf', | |||||
| 'passwordsalt' => 'ac6xvAO7CePJybwinGI2XLdYWQHW1A', | |||||
| 'secret' => 'tC+8RB5b78Krwt3n2/oXl8UgCnIEDQy3tEG/VlznWEVgQoxk', | |||||
| 'trusted_domains' => | |||||
| array ( | |||||
| 0 => 'nextcloud.reymota.es', | |||||
| ), | |||||
| 'datadirectory' => '/var/www/html/data', | |||||
| 'dbtype' => 'mysql', | |||||
| 'version' => '25.0.3.2', | |||||
| 'overwrite.cli.url' => 'https://nextcloud.reymota.es', | |||||
| 'overwriteprotocol' => 'https', | |||||
| 'installed' => true, | |||||
| 'mail_smtpmode' => 'smtp', | |||||
| 'mail_smtpsecure' => 'ssl', | |||||
| 'mail_sendmailmode' => 'smtp', | |||||
| 'mail_from_address' => 'creylopez', | |||||
| 'mail_domain' => 'yahoo.es', | |||||
| 'mail_smtpauthtype' => 'LOGIN', | |||||
| 'mail_smtpauth' => 1, | |||||
| 'mail_smtphost' => 'smtp.gmail.com', | |||||
| 'mail_smtpport' => '465', | |||||
| 'mail_smtpname' => 'king.bernard.b@gmail.com', | |||||
| 'mail_smtppassword' => 'hpvkLUQG', | |||||
| 'loglevel' => 0, | |||||
| 'maintenance' => false, | |||||
| 'app_install_overwrite' => | |||||
| array ( | |||||
| 0 => 'documentserver_community', | |||||
| ), | |||||
| 'theme' => '', | |||||
| 'dbname' => 'nextcloud_db', | |||||
| 'dbhost' => 'nextcloud-mysql', | |||||
| 'dbuser' => 'root', | |||||
| 'dbpassword' => 'Dsa-0213', | |||||
| 'updater.secret' => '$2y$10$wcEbQ5iZpDEwJkmA3dw6s.anS/aFNVgV96oKBTlEXG88sW59ghXSO', | |||||
| ); | |||||
| @ -1,4 +0,0 @@ | |||||
| kubectl create -f pv-local-nextcloud.yaml | |||||
| kubectl create -f pv-local-mysql.yaml | |||||
| kubectl create -k ./ | |||||
| #watch kubectl get all -n nextcloud | |||||
| @ -1 +0,0 @@ | |||||
| kubectl describe ingress.networking.k8s.io nextcloud-ingress -n nextcloud | |||||
| @ -1 +0,0 @@ | |||||
| kubectl exec -ti deployment.apps/nextcloud-server -n nextcloud -- /bin/bash | |||||
| @ -1,20 +0,0 @@ | |||||
| apiVersion: networking.k8s.io/v1 | |||||
| kind: Ingress | |||||
| metadata: | |||||
| name: nextcloud-ingress | |||||
| namespace: nextcloud | |||||
| annotations: | |||||
| nginx.ingress.kubernetes.io/rewrite-target: /$2 | |||||
| spec: | |||||
| ingressClassName: nginx | |||||
| rules: | |||||
| - host: "reymota.ddns.net" | |||||
| http: | |||||
| paths: | |||||
| - pathType: Prefix | |||||
| path: "/nextcloud" | |||||
| backend: | |||||
| service: | |||||
| name: nextcloud-server | |||||
| port: | |||||
| number: 80 | |||||
| @ -1,14 +0,0 @@ | |||||
| secretGenerator: | |||||
| - name: mysqlnc-pass | |||||
| namespace: nextcloud | |||||
| literals: | |||||
| - password=Dsa-0213 | |||||
| - db_user=root | |||||
| - db_passwd=Dsa-0213 | |||||
| resources: | |||||
| - nc-namespace.yaml | |||||
| - registry-secrets.yaml | |||||
| - pvc-nextcloud.yaml | |||||
| - mysql-deployment.yaml | |||||
| - php-deployment.yaml | |||||
| - nextcloud-deployment.yaml | |||||
| @ -1,70 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: nextcloud-mysql | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: nextcloud | |||||
| spec: | |||||
| ports: | |||||
| - port: 3306 | |||||
| selector: | |||||
| app: nextcloud | |||||
| tier: mysql | |||||
| clusterIP: None | |||||
| --- | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolumeClaim | |||||
| metadata: | |||||
| name: mysql-nc-pv-claim | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: nextcloud | |||||
| spec: | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| resources: | |||||
| requests: | |||||
| storage: 20Gi | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: nextcloud-mysql | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: nextcloud | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: nextcloud | |||||
| tier: mysql | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: nextcloud | |||||
| tier: mysql | |||||
| spec: | |||||
| containers: | |||||
| - image: docker-registry:32000/mariadb:1.0 | |||||
| name: mysql | |||||
| env: | |||||
| - name: MYSQL_ROOT_PASSWORD | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlnc-pass | |||||
| key: password | |||||
| ports: | |||||
| - containerPort: 3306 | |||||
| name: mysql | |||||
| volumeMounts: | |||||
| - name: mysql-persistent-storage | |||||
| mountPath: /var/lib/mysql | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| volumes: | |||||
| - name: mysql-persistent-storage | |||||
| persistentVolumeClaim: | |||||
| claimName: mysql-nc-pv-claim | |||||
| @ -1,4 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Namespace | |||||
| metadata: | |||||
| name: nextcloud | |||||
| @ -1,51 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: nextcloud-server | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: nextcloud | |||||
| spec: | |||||
| selector: | |||||
| pod-label: nextcloud-server-pod | |||||
| type: NodePort | |||||
| ports: | |||||
| - port: 80 | |||||
| nodePort: 30289 | |||||
| targetPort: nextcloud | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: nextcloud-server | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: nextcloud | |||||
| spec: | |||||
| replicas: 1 | |||||
| selector: | |||||
| matchLabels: | |||||
| pod-label: nextcloud-server-pod | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| pod-label: nextcloud-server-pod | |||||
| spec: | |||||
| containers: | |||||
| - name: nextcloud | |||||
| #image: nextcloud | |||||
| image: docker-registry:32000/nextcloud:1.0 | |||||
| volumeMounts: | |||||
| - name: server-storage | |||||
| mountPath: /var/www/html | |||||
| subPath: server-data | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| name: nextcloud | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| volumes: | |||||
| - name: server-storage | |||||
| persistentVolumeClaim: | |||||
| claimName: dbnc-pv-claim | |||||
| @ -1,48 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: nextcloud-server | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: nextcloud | |||||
| spec: | |||||
| selector: | |||||
| pod-label: nextcloud-server-pod | |||||
| type: NodePort | |||||
| ports: | |||||
| - port: 80 | |||||
| nodePort: 30289 | |||||
| targetPort: nextcloud | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: nextcloud-server | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: nextcloud | |||||
| spec: | |||||
| replicas: 1 | |||||
| selector: | |||||
| matchLabels: | |||||
| pod-label: nextcloud-server-pod | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| pod-label: nextcloud-server-pod | |||||
| spec: | |||||
| containers: | |||||
| - name: nextcloud | |||||
| image: nextcloud | |||||
| volumeMounts: | |||||
| - name: server-storage | |||||
| mountPath: /var/www/html | |||||
| subPath: server-data | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| name: nextcloud | |||||
| volumes: | |||||
| - name: server-storage | |||||
| persistentVolumeClaim: | |||||
| claimName: dbnc-pv-claim | |||||
| @ -1,3 +0,0 @@ | |||||
| kubectl delete -k ./ | |||||
| kubectl delete -f pv-local-nextcloud.yaml | |||||
| kubectl delete -f pv-local-mysql.yaml | |||||
| @ -1,56 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: Service | |||||
| metadata: | |||||
| name: phpmyadmin-nextcloud | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: nextcloud | |||||
| spec: | |||||
| selector: | |||||
| app: nextcloud | |||||
| tier: phpmyadmin | |||||
| type: NodePort | |||||
| ports: | |||||
| - name: phpadmin | |||||
| port: 80 | |||||
| nodePort: 30480 | |||||
| targetPort: phpmyadm | |||||
| --- | |||||
| apiVersion: apps/v1 | |||||
| kind: Deployment | |||||
| metadata: | |||||
| name: phpmyadmin-nextcloud | |||||
| namespace: nextcloud | |||||
| labels: | |||||
| app: nextcloud | |||||
| spec: | |||||
| selector: | |||||
| matchLabels: | |||||
| app: nextcloud | |||||
| tier: phpmyadmin | |||||
| strategy: | |||||
| type: Recreate | |||||
| template: | |||||
| metadata: | |||||
| labels: | |||||
| app: nextcloud | |||||
| tier: phpmyadmin | |||||
| spec: | |||||
| containers: | |||||
| - name: phpmyadmin | |||||
| image: docker-registry:32000/phpmyadmin:1.0 | |||||
| ports: | |||||
| - containerPort: 80 | |||||
| name: phpmyadm | |||||
| env: | |||||
| - name: PMA_HOST | |||||
| value: nextcloud-mysql | |||||
| - name: PMA_PORT | |||||
| value: "3306" | |||||
| - name: MYSQL_ROOT_PASSWORD | |||||
| valueFrom: | |||||
| secretKeyRef: | |||||
| name: mysqlnc-pass | |||||
| key: password | |||||
| imagePullSecrets: | |||||
| - name: reg-cred-secret | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: nc-data | |||||
| spec: | |||||
| capacity: | |||||
| storage: 20Gi | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| hostPath: | |||||
| path: "/mnt/cluster/nextcloud/nextcloud-db" | |||||
| @ -1,11 +0,0 @@ | |||||
| apiVersion: v1 | |||||
| kind: PersistentVolume | |||||
| metadata: | |||||
| name: nextcloud | |||||
| spec: | |||||
| capacity: | |||||
| storage: 50Gi | |||||
| accessModes: | |||||
| - ReadWriteOnce | |||||
| hostPath: | |||||
| path: "/mnt/cluster/nextcloud" | |||||