Skip to content

robert-kel-tg/k8s-php-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Install, start, dashboard minikube

brew install minikube
minikube --bootstrapper=kubeadm --kubernetes-version=v1.8.5 start
minikube dashboard

Build, tag and push to dockerhub

docker build . -t php7-fpm
*note*: docker run -it php7-fpm sh
docker tag php7-fpm robkel/php7-fpm
docker push robkel/php7-fpm

Steps to create

kubectl create -f k8s/php7fpm-rc.yaml
kubectl create -f k8s/php7fpm-svc.yaml
#note: ssh into php7fpm container and create /public/index.php folder; kubectl get pods; kubectl exec -it php7-fpm-48wjd sh;
kubectl create configmap nginx-config --from-file=k8s/configmap-files
kubectl create -f k8s/my-nginx.yaml
kubectl create -f k8s/nginx-svc.yaml
minikube service my-nginx

ssh into nginx container

kubectl exec -it [pod name] -c my-nginx bash
kubectl exec -it [pod name] -c phpfpm sh

About

Basic pod with nginx and php7.2-fpm containers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages