student-node ~ ➜ kubectl config use-context cluster3
Switched to context “cluster3”.
student-node ~ ➜ helm repo add polar https://charts.bitnami.com/bitnami
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
“polar” has been added to your repositories
student-node ~ ➜ helm search repo nginx
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME CHART VERSION APP VERSION DESCRIPTION
polar/nginx 15.3.3 1.25.2 NGINX Open Source is a web server that can be a…
polar/nginx-ingress-controller 9.9.0 1.9.0 NGINX Ingress Controller is an Ingress controll…
polar/nginx-intel 2.1.15 0.4.9 DEPRECATED NGINX Open Source for Intel is a lig…
student-node ~ ➜ k create ns cd-tool-apd
namespace/cd-tool-apd created
student-node ~ ➜ helm install nginx-server polar/nginx -n cd-tool-apd
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME: nginx-server
LAST DEPLOYED: Thu Oct 12 05:37:37 2023
NAMESPACE: cd-tool-apd
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
CHART NAME: nginx
CHART VERSION: 15.3.3
APP VERSION: 1.25.2
** Please be patient while the chart is being deployed **
NGINX can be accessed through the following DNS name from within your cluster:
nginx-server.cd-tool-apd.svc.cluster.local (port 80)
To access NGINX from outside the cluster, follow the steps below:
- Get the NGINX URL by running these commands:
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: ‘kubectl get svc --namespace cd-tool-apd -w nginx-server’
export SERVICE_PORT=$(kubectl get --namespace cd-tool-apd -o jsonpath="{.spec.ports[0].port}" services nginx-server)
export SERVICE_IP=$(kubectl get svc --namespace cd-tool-apd nginx-server -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "http://${SERVICE_IP}:${SERVICE_PORT}"
student-node ~ ➜ helm ls
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
student-node ~ ➜ helm ls -n cd-tool-apd
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
nginx-server cd-tool-apd 1 2023-10-12 05:37:37.902369687 +0000 UTC deployed nginx-15.3.3 1.25.2
student-node ~ ➜ k get all -n cd-tool-apd
NAME READY STATUS RESTARTS AGE
pod/nginx-server-78d478c86c-hzr4t 1/1 Running 0 47s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/nginx-server LoadBalancer 10.104.140.112 80:30736/TCP 47s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/nginx-server 1/1 1 1 47s
NAME DESIRED CURRENT READY AGE
replicaset.apps/nginx-server-78d478c86c 1 1 1 47s
student-node ~ ➜
It works now, Thanks Alistair!