I am trying to add a StorageClass to a test K8 cluster to then deploy additional services such as Prometheus. I am running into a problem trying to add a StorageClass of standard to link the pv ad pvc's together. I created a local file called ebs-storage.json with the following:
{
"kind": "StorageClass",
"apiVersion": "storage.k8s.io/v1beta1",
"metadata": {
"name": "standard"
},
"provisioner": "kubernetes.io/aws-ebs",
"parameters": {
"type": "gp2",
"zone": "us-west-2a"
}
}
and then I run:
kubectl create -f ./ebs-storage.json
but this is returning:
Error from server: error when creating "./ebs-storage.json": the server could not find the requested resource
Running on server version 1.4.6 and client 1.3.4. I know I am missing something obvious but have been unable to figure out what
This ended up being a kubectl version issue. I updated to the latest and was able to create the StorageClass