I'm new to kubernetes and not sure what prerequisite I'm missing in order to make it work.
I ran the following command
kubectl create -f k8s-pod.yml
and the response is
The connection to the server localhost:8080 was refused - did you specify the right host or port?
k8s-pod.yml
apiVersion: v1
kind: Pod
metadata:
name: app
labels:
language: go
env: test
spec:
containers:
- name: app
image: app:1.0.8
ports:
- containerPort: 8080
protocol: TCP
can you check if you can connect to kubernetes cluster using the below command
kubectl get cs
if you get an error that means you cant connect to kubernetes api server. check your kubernetes setup