Hi KodeKloud Team,
I am having some issues with Lightening Lab - 1
…specifically with with the Netpolicy
challenge, which for some reason (even though my answer appears to be correct) always comes up as being incorrect:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: test-network-policy
namespace: default
spec:
podSelector:
matchLabels:
run: secure-pod
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
name: webapp-color
ports: - protocol: TCP
port: 80
I tested to see if the service port was open & everything appears to be OK on that end:
kb exec -it webapp-color -- sh
nc -z -v -w 1 secure-service 80
I am also facing an issue with the last task. This is what I have, but it’s coming up as being incorrect:
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: redis
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: redis
spec:
nodeSelector:
kubernetes.io/hostname: master
tolerations:
- key: node-role.kubernetes.io/master
operator: "Exists"
effect: "NoSchedule"
volumes:
- name: data
emptyDir: {}
- name: config
configMap:
name: redis-config
containers:
- image: redis:alpine
name: redis
volumeMounts:
- mountPath: /redis-master-data
name: data
- mountPath: /redis-master
name: config
ports:
- containerPort: 6379
resources:
requests:
cpu: "0.2"
Is there somewhere I can view the answers so that I can’t see where I’ve going wrong?
Thanks:-)