Nginx deployment and kustomize will add another nginx-ingress deployment
Hi there, thanks for your great work and those videos!
In E01 2020 it is explained how to remove Nginx, install MetalLB and then deploy Nginx again by running those two steps:
- kubectl apply -f http://..some_outdated_url
- kustomize build . |kubectl apply -f -
Unfortunately, the kustomization stuff from this Git repo no longer seems to be compatible to the official nginx-ingress deployment. When following the steps from the video, finding the current url for kubectl apply -f http://nginx-ingress and then running kustomize, it will deploy another nginx with a Pod that is constantly crashing. I think there is already an issue here for that.
This is what I did:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/baremetal/deploy.yaml
kubectl kustomize | kubectl apply -f -
serviceaccount/nginx-ingress-serviceaccount created
Warning: rbac.authorization.k8s.io/v1beta1 Role is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 Role
role.rbac.authorization.k8s.io/nginx-ingress-role created
Warning: rbac.authorization.k8s.io/v1beta1 RoleBinding is deprecated in v1.17+, unavailable in v1.22+; use rbac.authorization.k8s.io/v1 RoleBinding
rolebinding.rbac.authorization.k8s.io/nginx-ingress-role-nisa-binding created
configmap/nginx-configuration created
configmap/tcp-services created
configmap/udp-services created
service/ingress-nginx created
limitrange/ingress-nginx created
deployment.apps/nginx-ingress-controller created
Now I have this:
~/deploy_metallb/channel/resources/2020.01/deploy/2-nginx/base$ kubectl get all -n ingress-nginx
NAME READY STATUS RESTARTS AGE
pod/ingress-nginx-admission-create-2wjjj 0/1 Completed 0 9m8s
pod/ingress-nginx-admission-patch-zrpx2 0/1 Completed 0 9m8s
pod/ingress-nginx-controller-659dbc6d66-bcbt5 1/1 Running 0 9m9s
pod/nginx-ingress-controller-69596b6b56-kxbkb 0/1 ContainerCreating 0 48s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/ingress-nginx LoadBalancer 10.43.12.200 TOPSECRET 80:32285/TCP,443:32680/TCP 48s
service/ingress-nginx-controller NodePort 10.43.180.26 <none> 80:31586/TCP,443:30098/TCP 9m9s
service/ingress-nginx-controller-admission ClusterIP 10.43.63.248 <none> 443/TCP 9m9s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/ingress-nginx-controller 1/1 1 1 9m9s
deployment.apps/nginx-ingress-controller 0/1 1 0 48s
NAME DESIRED CURRENT READY AGE
replicaset.apps/ingress-nginx-controller-659dbc6d66 1 1 1 9m9s
replicaset.apps/nginx-ingress-controller-69596b6b56 1 1 0 48s
NAME COMPLETIONS DURATION AGE
job.batch/ingress-nginx-admission-create 1/1 2s 9m8s
job.batch/ingress-nginx-admission-patch 1/1 2s 9m8s
Can you please update this Git repository and provide instructions how to correctly deploy MetalLB and Nginx so they will work together?
Edited by Valentin Höbel