The commands to create Secrets are almost the same as those we used to create ConfigMaps. We can, for example, generate Secrets based on literal values.
kubectl create secret \ generic my-creds \ --from-literal=username=jdoe \ --from-literal=password=incognito
The major difference is that we specified the type of the Secret as generic. It could also be docker-registry or tls. We won't explore those two, but only say that the former can be used to provide kubelet with credentials it needs to pull images from private registries. The latter is used for storing certificates. In this chapter, we'll focus on the generic type of secrets which happen to use the same syntax as ConfigMaps.
Just as with ConfigMaps, ...