Skip to content

Instantly share code, notes, and snippets.

@shiywang
shiywang / output
Created February 7, 2017 14:01
apply view last-applied output
shiywang@dhcp-140-33 template $ ./kubectl apply view last-applied -f update_deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations: {}
name: nginx-deployment
namespace: myproject
spec:
template:
metadata:
shiywang@dhcp-140-33 template $ ./kubectl apply -f rc.yaml --v=8
serializer decode
not in
gvk is %+v /v1, Kind=Config
yaml
actual is %+v /v1, Kind=Config
into != nil
I0310 18:40:43.181873 594 loader.go:354] Config loaded from file /home/shiywang/.kube/config
I0310 18:40:43.182647 594 round_trippers.go:395] GET https://10.66.141.173:8443/version
I0310 18:40:43.182659 594 round_trippers.go:402] Request Headers:
shiywang@dhcp-140-33 template $ ./kubectl apply -f rc.yaml --v=8
versioned Decode
json or yaml serializer decode
not in
gvk is %+v /v1, Kind=Config
yaml
actual is %+v /v1, Kind=Config
into != nil
I0311 16:39:32.286639 30600 loader.go:354] Config loaded from file /home/shiywang/.kube/config
I0311 16:39:32.287286 30600 round_trippers.go:395] GET https://10.210.6.242:8443/version
shiywang@dhcp-140-33 template $ ./kubectl convert -f rc.yaml --v=8
versioned Decode
json or yaml serializer decode
not in
gvk is %+v /v1, Kind=Config
yaml
actual is %+v /v1, Kind=Config
into != nil
I0311 17:07:55.223139 15674 loader.go:354] Config loaded from file /home/shiywang/.kube/config
running in local mode...
[root@shiywang kubernetes]# hack/ginkgo-e2e.sh -v
Setting up for KUBERNETES_PROVIDER="local".
Local doesn't need special preparations for e2e tests
/home/centos/go/src/k8s.io/kubernetes/_output/bin/ginkgo /home/centos/go/src/k8s.io/kubernetes/_output/bin/e2e.test -- --kubeconfig=/root/.kube/config --ginkgo.flakeAttempts=1 --host=http://127.0.0.1:8080 --provider=local --gce-project= --gce-zone= --gke-cluster= --kube-master=localhost --cluster-tag= --repo-root=/home/centos/go/src/k8s.io/kubernetes/cluster/.. --node-instance-group= --prefix=e2e --network=e2e --federated-kube-context=e2e-federation --container-runtime=test -v
[root@shiywang kubernetes]# exprot GINKGO_UNTIL_IT_FAILS=true
bash: exprot: command not found
[root@shiywang kubernetes]# export GINKGO_UNTIL_IT_FAILS=true
[root@shiywang kubernetes]# hack/ginkgo-e2e.sh -v
Setting up for KUBERNETES_PROVIDER="local".
Local doesn't need special preparations for e2e tests
func SerializationConvert(codec runtime.Encoder, original, updated runtime.Object) ([]byte, []byte, error) {
originalSerialization, err := runtime.Encode(codec, original)
if err != nil {
return nil, nil, err
}
editedSerialization, err := runtime.Encode(codec, updated)
if err != nil {
return nil, nil, err
}
apiVersion: v1
kind: Pod
metadata:
name: demo
spec:
containers:
- name: nginx-demo
image: nginx
ports:
- containerPort: 80
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: nginx1
spec:
replicas: 1
template:
metadata:
labels:
app: nginx
(*context.valueCtx)(0xc4203497d0)(context.TODO.WithValue(0, "test"))
(string) (len=9) "/pods/foo"
(*example.Pod)(0xc420303800)({
TypeMeta: (v1.TypeMeta) &TypeMeta{Kind:,APIVersion:,},
ObjectMeta: (v1.ObjectMeta) &ObjectMeta{Name:,GenerateName:,Namespace:,SelfLink:,UID:,ResourceVersion:,Generation:0,CreationTimestamp:0001-01-01 00:00:00 +0000 UTC,DeletionTimestamp:<nil>,DeletionGracePeriodSeconds:nil,Labels:map[string]string{},Annotations:map[string]string{},OwnerReferences:[],Finalizers:[],ClusterName:,Initializers:nil,},
Spec: (example.PodSpec) {
RestartPolicy: (example.RestartPolicy) "",
TerminationGracePeriodSeconds: (*int64)(<nil>),