resource type "pods" $ kubectl get deploy error: the server doesn't have a resource type "deploy" $ kubectl get nodes error: the server doesn't have a resource type "nodes" $ kubectl get configmaps NAME DATA AGE kube-root-ca.crt 1 126m $ kubectl version Client Version: v1.29.2 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.28.1+kcp-v0.24.0 通常のリソースが存在しない サーバのバージョンが “kcp”
├── chat │ └── photo ├── db └── storage $ kubectl workspace :root:app:chat Current workspace is 'root:app:chat' (type root:universal). $ kubectl get configmaps NAME DATA AGE example 1 10s kube-root-ca.crt 1 3m23s $ kubectl workspace :root:app:photo Current workspace is 'root:app:photo' (type root:universal). $ kubectl get configmaps NAME DATA AGE kube-root-ca.crt 1 4m22s Workspace の階層構造 chat Workspace からは ConfigMap が見える photo Workspace からは ConfigMap が見えない
$ kubectl apply -f apiresourceschema.yaml apiresourceschema.apis.kcp.io/v240508.buckets.storage.example.com created $ kubectl apply -f apiexport.yaml apiexport.apis.kcp.io/buckets.storage.example.com created $ kubectl workspace :root:app:photo Current workspace is 'root:app:photo' (type root:universal). $ kubectl apply -f bucket.yaml error: resource mapping not found for name: "photo-bucket" namespace: "" from "bucket.yaml": no matches for kind "Bucket" in version "storage.example.com/v1" ensure CRDs are installed first $ kubectl apply -f apibinding.yaml apibinding.apis.kcp.io/buckets-api created $ kubectl apply -f bucket.yaml bucket.storage.example.com/photo-bucket created APIBinding を作成して初めて Bucket 払い出し API が使用できる