Skip to main content

Kubernetes Daily Task Aug 17


Geoff Burke
Forum|alt.badge.img+22

We will continue with our task from yesterday. First of all check to see that your pod is still running

 

kubectl get po -n nginx

Create a text file called index.html with the following content: I love the Kubernetes Korner!

copy this into the pod (do a kubectl get pods -n nginx to get your specific pod name

 kubectl cp index.html -n nginx nginx-58bcd76ff8-tm4h4:/usr/share/nginx/html/

Now lets create a service:

apiVersion: v1
kind: Service
metadata:
  name: nginx
  namespace: nginx
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 80
    nodePort: 30011
  selector:
    app: nginx

Now type the following and see what happens, or what should happen :) 

minikube service nginx -n nginx

 

2 comments

Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 8521 comments
  • August 17, 2022

Cool need to finish the other parts from yesterday before this but will work to get it done.


Forum|alt.badge.img+4
  • Experienced User
  • 576 comments
  • August 18, 2022

Awesome.. 


Comment