Kubernetes environment variable

I did everything correct, just given wrong container name, please reassign to me.

apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: envars-fieldref
name: envars-fieldref
namespace: fieldref-namespace
spec:
containers:

  • image: httpd:latest
    name: envars-fieldref
    command: [“sh”,"-c",“while true; do echo -en ‘/n’; printenv NODE_NAME POD_NAM POD_NAMESPACE; printenv POD_IP POD_SERVICE_ACCOUNT; sleep 10; done;”]
    env:
    - name: NODE_NAME
    valueFrom:
    fieldRef:
    fieldPath: spec.nodeName
    - name: POD_NAME
    valueFrom:
    fieldRef:
    fieldPath: metadata.name
    - name: POD_NAMESPACE
    valueFrom:
    fieldRef:
    fieldPath: metadata.namespace
    - name: POD_IP
    valueFrom:
    fieldRef:
    fieldPath: status.podIP
    - name: POD_SERVICE_ACCOUNT
    valueFrom:
    fieldRef:
    fieldPath: spec.serviceAccountName
    restartPolicy: Never

hi @smohdiqbal, as per question, container name should be feildref-container instead of envars-fieldref.

You should stick to the question. Please put the task in review to get another chance to attempt.

@rahul456, yes i know i made this mistake, review should be done for the question where we dont know something. this way i will loose marks , other person will get marks without doing anything.

I request you to assign back to me .
thanks

the task will expire, please reply soon

@smohdiqbal, marked pending for you, please give it an another try,

And, please be stick to the question for the future tasks.

ok for sure,
thanks,