谷粒商城完结
作者:互联网
谷粒商城完成
上线的代码,我提交到prod分支了:https://gitee.com/dalianpai/gulimall
主要就是nginx的镜像制作,commit的时候,拿不到静态和配置文件,需要自己手写制作。
由于我之前K8s学过视频,跳过一些,ingress的控制器没有部署,导致一直不能访问,后来发现了,在这里把步骤补上。
还有最后几节就不看了,打算学别的了,有时间还是会在巩固一下,毕竟讲了很多东西。
[root@k8s-master gulimall]# kubectl apply -f ingress-controller.yaml
namespace/ingress-nginx created
configmap/nginx-configuration created
configmap/tcp-services created
configmap/udp-services created
serviceaccount/nginx-ingress-serviceaccount created
clusterrole.rbac.authorization.k8s.io/nginx-ingress-clusterrole created
role.rbac.authorization.k8s.io/nginx-ingress-role created
rolebinding.rbac.authorization.k8s.io/nginx-ingress-role-nisa-binding created
clusterrolebinding.rbac.authorization.k8s.io/nginx-ingress-clusterrole-nisa-binding created
daemonset.apps/nginx-ingress-controller created
service/ingress-nginx created
[root@k8s-master gulimall]# kubectl get pods -n ingress-nginx
NAME READY STATUS RESTARTS AGE
nginx-ingress-controller-f5w6j 0/1 ContainerCreating 0 55s
nginx-ingress-controller-nbdrk 0/1 ContainerCreating 0 55s
nginx-ingress-controller-qdgls 0/1 ContainerCreating 0 55s
[root@k8s-master gulimall]# kubectl get pods -n ingress-nginx
NAME READY STATUS RESTARTS AGE
nginx-ingress-controller-f5w6j 0/1 ContainerCreating 0 57s
nginx-ingress-controller-nbdrk 0/1 ContainerCreating 0 57s
nginx-ingress-controller-qdgls 0/1 ContainerCreating 0 57s
[root@k8s-master gulimall]# kubectl get svc -n ingress-nginx
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ingress-nginx ClusterIP 10.100.210.79 <none> 80/TCP,443/TCP 73s
[root@k8s-master gulimall]# kubectl get pod -n ingress-nginx
NAME READY STATUS RESTARTS AGE
nginx-ingress-controller-f5w6j 0/1 ContainerCreating 0 85s
nginx-ingress-controller-nbdrk 0/1 ContainerCreating 0 85s
nginx-ingress-controller-qdgls 0/1 ContainerCreating 0 85s
[root@k8s-master gulimall]# kubectl get pod -n ingress-nginx
NAME READY STATUS RESTARTS AGE
nginx-ingress-controller-f5w6j 1/1 Running 0 2m29s
nginx-ingress-controller-nbdrk 1/1 Running 0 2m29s
nginx-ingress-controller-qdgls 1/1 Running 0 2m29s
[root@k8s-master gulimall]# ll
标签:ingress,created,ContainerCreating,nginx,controller,谷粒,k8s,商城,完结 来源: https://www.cnblogs.com/dalianpai/p/13591175.html