Security - API Versions Flashcards
What does it mean when a api resource is at v1?
It is a generally available/ stable version
What kind of API Versions exist?
- alpha
- beta
- GA/stable
Which api Version is how available?
- alpha -> by default not enabled
- beta -> enabled by default
- GA -> by default enabled
What does it mean when an api group has multiple versions available?
- one apigroup can support multiple versions
- all versions can be used to create objects
- only one version can be a preferred version
- the preferred version is used in imperativ commands
How can you see the preferred version?
- when you list the api-resource is it shown
What is the first rule of API deprecation policy?
- API elements may only be removed by incrementing the version of the API group
What is the second rule of API deprecation policy?
API objects must be able to round-trip between API versions in a given release without information loss, with the exception of whole REST resources that do not exist in some versions
How can you convert older yaml files to newer versions?
kubectl convert -f < old-file> –output-version < new-api>
How can you identify the preferred version?
- kubectl proxy 8001& (& runs in background)
- curl localhost:8001/apis/authorization.k8s.io
How can you copy a file in Linux?
cp oldfile nextfile
How do you configure a kube-apiserver to enable a certain version of an api-resources?
In kube-apiserver under /etc/kubernetes/manifest/.yaml
add
‘–runtime-config=resourceName like rbac.authorization.k8s.io/v1alpha’
How can you get an explanation of an object? / identify the api group its part of?
k explain job